Skip to main content

begin_scope

Macro begin_scope 

Source
macro_rules! begin_scope {
    ($category:tt, $label:tt $(, $key:tt => $val:expr)* $(,)?) => { ... };
}
Expand description

Creates a scope guard (Option<KTraceScope>) that captures the given arguments at the beginning of a scope when the given category is enabled, and emits the duration complete event when dropped or ended via end_scope!. The complete event is associated with the current thread.

§Arguments:

  • category: Filter category for the event. Expects a string literal or expression.
  • label: Label for the event. Expects a string literal or expression.
  • …: List of key => value argument pairs.