Skip to main content

update_candid_args

Function update_candid_args 

Source
pub fn update_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 an update as caller, decoding the top-level Candid reply arguments.

Unlike CandidCallExt::update_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.