Skip to main content

expr_param

Macro expr_param 

Source
macro_rules! expr_param {
    (($expr:expr)) => { ... };
    ({$deferred:expr}) => { ... };
    ($param:expr) => { ... };
}
Expand description

Helper macro to handle different parameter syntaxes.

  • (expr) — nested expression (calls .expr() via Expressive)
  • {expr} — deferred function
  • expr — scalar (calls .into())

Function calls like id_value(id) work as scalars because $($rest:tt)* captures the entire token sequence before forwarding to the scalar arm.