Skip to main content

Capability

Trait Capability 

Source
pub trait Capability: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn status<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = CapabilityStatus> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait implemented by each domain to participate in koi status.

status is async so cores can read their internal tokio locks directly (the runtime adapter needs this; the others read sync locks but stay uniform). name is sync.

Required Methods§

Source

fn name(&self) -> &str

Source

fn status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = CapabilityStatus> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§