diagnostics::task_metrics::runtime_stats_source

Trait ComponentStartedInfo

Source
pub trait ComponentStartedInfo<T, S>{
    // Required methods
    fn get_receiver<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Option<Receiver<T>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn start_time(&self) -> BootInstant;
}
Expand description

Trait for the providers of asynchronous receivers where the diagnostics data is sent. Used for simplying testing.

Required Methods§

Source

fn get_receiver<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<Receiver<T>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Fetches a oneshot receiver that will eventually resolve to the diagnostics of a component if the runner provides them.

Source

fn start_time(&self) -> BootInstant

Returns the reported start time.

Implementations on Foreign Types§

Source§

impl ComponentStartedInfo<ComponentDiagnostics, Task> for RuntimeInfo

Source§

fn get_receiver<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<Receiver<ComponentDiagnostics>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn start_time(&self) -> BootInstant

Implementors§