[][src]Macro econtext::econtext_data

macro_rules! econtext_data {
    ($message:expr, $data:expr) => { ... };
}

Provide a &'static str and some data as context.

Example: `econtext_data!("loop index", i);'

This has a very low overhead of around 15 ns on a 2020 MacBook Pro.

Unfortunately econtext_data! does not support references, so things like &str must be converted into their owned versions, e.g. `econtext_data!("file_name", file_name.to_owned());'.