pub trait WithObserver: Sized + Future {
// Provided method
fn with_observer(self, observer: Arc<dyn Observer>) -> Instrumented<Self> ⓘ { ... }
}Expand description
Public extension trait — .with_observer(o) on a future binds an
observer override that follows the future across thread migration
(per-task tier; spec 11 § 3.1).
Provided Methods§
Sourcefn with_observer(self, observer: Arc<dyn Observer>) -> Instrumented<Self> ⓘ
fn with_observer(self, observer: Arc<dyn Observer>) -> Instrumented<Self> ⓘ
Bind a per-task observer override to the future.
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.