pub trait RuntimeStatsSource {
    // Required methods
    fn koid(&self) -> Result<zx_koid_t, Status>;
    fn handle_ref(&self) -> HandleRef<'_>;
    fn get_runtime_info<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<TaskRuntimeInfo, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait that all structs that behave as Task’s implement. Used for simplying testing.

Required Methods§

source

fn koid(&self) -> Result<zx_koid_t, Status>

The koid of the Cpu stats source.

source

fn handle_ref(&self) -> HandleRef<'_>

The returned future will resolve when the task is terminated.

source

fn get_runtime_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<TaskRuntimeInfo, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provides the runtime info containing the stats.

Implementations on Foreign Types§

source§

impl RuntimeStatsSource for Task

source§

fn koid(&self) -> Result<zx_koid_t, Status>

source§

fn handle_ref(&self) -> HandleRef<'_>

source§

fn get_runtime_info<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<TaskRuntimeInfo, Status>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§