Skip to main content

RuntimeStatsSource

Trait RuntimeStatsSource 

Source
pub trait RuntimeStatsSource {
    // Required methods
    fn koid(&self) -> Result<zx_koid_t, Status>;
    fn handle_ref(&self) -> HandleRef<'_>;
    fn get_runtime_info(&self) -> Result<TaskRuntimeInfo, Status>;
}
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(&self) -> Result<TaskRuntimeInfo, Status>

Provides the runtime info containing the stats.

Dyn Compatibility§

This trait is dyn compatible.

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

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(&self) -> Result<TaskRuntimeInfo, Status>

Implementors§