Closed GandelXIV closed 9 months ago
This macro greatly simplifies building Contexts, as you just pass it key-value pairs and inserts them for you.
Example:
use tera::context; let ctx = context! { name => "Brian", age => &24 };
Expands to:
let ctx = { let mut context = Context::new(); context.insert("name", "Brian"); context.insert("age", &24); context };
This macro greatly simplifies building Contexts, as you just pass it key-value pairs and inserts them for you.
Example:
Expands to: