How to encode () type for candid in rust?

I am communicating with my canister using ic-agent and rust and candid. And i have a query method balance, it has the type: balance : () -> (nat) query;, so how can i encode and pass the () parameter to the function in rust?

Calling canisters without an argument requires a candid-bytes with no values? - Developers - Internet Computer Developer Forum (

candid::encode_args(()) with the empty tuple.

1 Like