iota_metrics

Trait MonitoredFutureExt

Source
pub trait MonitoredFutureExt: Future + Sized {
    // Required method
    fn in_monitored_scope(
        self,
        name: &'static str,
    ) -> MonitoredScopeFuture<Self> ;
}
Expand description

A trait extension for Future to allow monitoring the execution of the future within a specific scope. Provides the in_monitored_scope method to wrap the future in a MonitoredScopeFuture, which tracks the future’s execution using a MonitoredScopeGuard for monitoring purposes.

Required Methods§

Source

fn in_monitored_scope(self, name: &'static str) -> MonitoredScopeFuture<Self>

Wraps the current future in a MonitoredScopeFuture that is associated with a specific monitored scope name. The scope helps track the execution of the future for performance analysis and metrics collection.

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§