decode_args_with_decoding_quota

Function decode_args_with_decoding_quota 

Source
pub fn decode_args_with_decoding_quota<const N: usize, Tuple>(
    byte_vec: Vec<u8>,
) -> Tuple
where Tuple: for<'a> ArgumentDecoder<'a>,
Expand description

Decode a series of arguments, represented as a tuple, with a decoding_quota specified as a const generic number.

This function is particularly useful as a decoder in ic-cdk macros (version 0.18 and up).

Example:

#[ic_cdk::query(decode_with = "decode_args_with_decoding_quota::<10000,_>")]
fn count(arg1: String, arg2: String) -> u32 {
   arg1.len() as u32 + arg2.len() as u32
}