pub trait Instrument {
    // Required methods
    fn on_enter(&mut self);
    fn on_exit(&mut self);
}
Expand description

Signal when a span is entered or exited.

Some implementations for commonly used types are provided in the instruments module. You may also implement this trait yourself.

Required Methods§

source

fn on_enter(&mut self)

This method is called when the span is entered.

source

fn on_exit(&mut self)

This method is called when the span is exited.

Implementors§