pub trait MaybeInstrument: Future + Sized {
// Provided method
fn maybe_instrument(self, _name: &'static str) -> Self { ... }
}
Expand description
Conditionally instruments futures with tracing spans.
This trait provides a unified interface for adding tracing instrumentation to async operations. When the “tracing” feature is enabled, futures are wrapped with debug-level spans. When disabled, futures are returned unchanged.
Provided Methods§
Sourcefn maybe_instrument(self, _name: &'static str) -> Self
fn maybe_instrument(self, _name: &'static str) -> 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.
Implementors§
impl<F: Future> MaybeInstrument for F
Blanket implementation for all Future types.