fuchsia_trace

Macro counter

Source
macro_rules! counter {
    ($category:expr, $name:expr, $counter_id:expr $(, $key:expr => $val:expr)*) => { ... };
}
Expand description

Convenience macro for the counter function.

Example:

let id = 555;
counter!(c"foo", c"bar", id, "x" => 5, "y" => 10);

is equivalent to

let id = 555;
counter(c"foo", c"bar", id,
    &[ArgValue::of("x", 5), ArgValue::of("y", 10)]);