Macro akita::params[][src]

macro_rules! params {
    () => { ... };
    (@ to_pair $name : expr => $value : expr) => { ... };
    (@ to_pair $name : ident) => { ... };
    (@ expand $vec : expr ;) => { ... };
    (@ expand $vec : expr ; $name : expr => $value : expr, $($tail : tt) *) => { ... };
    (@ expand $vec : expr ; $name : expr => $value : expr $(, $tail : tt) *) => { ... };
    (@ expand $vec : expr ; $name : ident, $($tail : tt) *) => { ... };
    (@ expand $vec : expr ; $name : ident $(, $tail : tt) *) => { ... };
    ($i : ident, $($tail : tt) *) => { ... };
    ($i : expr => $($tail : tt) *) => { ... };
    ($i : ident) => { ... };
}
Expand description

This macro is a convenient way to pass named parameters to a statement.

let foo = 42;
params! {
    foo,
    "foo2x" => foo * 2,
});