Skip to main content

StatsCapable

Trait StatsCapable 

Source
pub trait StatsCapable: Send + Sync {
    // Required method
    fn stats<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = AppResult<WorkloadStats>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Implemented by backends that expose real-time resource usage statistics.

Required Methods§

Source

fn stats<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = AppResult<WorkloadStats>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Return a resource usage snapshot for the workload identified by id.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§