Skip to main content

simple_context

Macro simple_context 

Source
macro_rules! simple_context {
    () => { ... };
    ($key:literal : $value:expr $(,)?) => { ... };
    ($key:literal : $value:expr, $($rest_key:literal : $rest_value:expr),* $(,)?) => { ... };
}
Expand description

A macro to create a SimpleContext from key-value pairs.

ยงExample

use filter_expr::simple_context;

let ctx = simple_context! {
    "name": "John",
    "age": 19,
};