aztec-nr - noir_aztec::protocol::meta::utils

Function get_params_len_quote

pub comptime fn get_params_len_quote(params: [(Quoted, Type)]) -> Quoted

Generates a quoted expression that computes the total serialized length of function parameters.

Parameters

  • params - An array of tuples where each tuple contains a quoted parameter name and its Type. The type needs to implement the Serialize trait.

Returns

A quoted expression that evaluates to:

  • 0 if there are no parameters
  • (<type1 as Serialize>::N + <type2 as Serialize>::N + ...) for one or more parameters