pub trait MonitorCancellation {
// Required method
fn monitor_cancellation(self) -> CancelMonitor<Self> ⓘ
where Self: Sized + Future;
}Expand description
MonitorCancellation records a cancelled = true span attribute if the future it is decorating is dropped before completion. The cancelled attribute must be added at span creation, as you cannot add new attributes after the span is created.
Required Methods§
fn monitor_cancellation(self) -> CancelMonitor<Self> ⓘ
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".