Skip to main content

props

Macro props 

Source
macro_rules! props {
    () => { ... };
    ($(($k:expr, $v:expr)),* $(,)?) => { ... };
}
Expand description

Build a property list with mixed value types.

A Vec is homogeneous, so a literal mixing an int and a string cannot be written directly; this converts each value before collecting, which is what makes props![("staff", 42), ("name", "Acme")] compile.