Skip to main content

context

Macro context 

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

Builds a HashMap<String, Value> from key => value pairs, the same literal-context ergonomics every other client in this repo gets for free from its own language (a Python dict, a JS object literal, a PHP array):

let ctx = forge_ops_tracker::context!{"order_id" => 42, "customer" => "acme-inc"};