Skip to main content

query_candid_args

Function query_candid_args 

Source
pub fn query_candid_args<T, A>(
    pic: &PocketIc,
    canister_id: Principal,
    caller: Principal,
    method: &str,
    args: A,
) -> Result<T, CandidCallError>
where T: for<'de> ArgumentDecoder<'de>, A: ArgumentEncoder,
Expand description

Execute a query as caller, decoding the top-level Candid reply arguments.

Unlike CandidCallExt::query_candid_as, (u64, bool) means two reply arguments rather than one tuple-valued reply. Use () for no replies or (T,) for one reply. Pass Principal::anonymous() for an anonymous caller. Application-level Result<T, E> values are returned without unwrapping.