pub trait Observe: Sized {
// Required method
fn observe(self, name: &str) -> Instrumented<Self>;
}
Expand description
Instruments a future with a tracing
span.
This span is given the trace_tools::observe
target, so that it can be more easily filtered
in any subscribers or subscriber layers. It also records the future’s calling location
in its fields.
Required Methods§
Sourcefn observe(self, name: &str) -> Instrumented<Self>
fn observe(self, name: &str) -> Instrumented<Self>
Instruments Self
with a tracing
span, returning Instrumented<Self>
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.