wasi_common::sched

Trait WasiSched

Source
pub trait WasiSched: Send + Sync {
    // Required methods
    fn poll_oneoff<'a, 'life0, 'life1, 'async_trait>(
        &'life0 self,
        poll: &'life1 mut Poll<'a>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn sched_yield<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn sleep<'life0, 'async_trait>(
        &'life0 self,
        duration: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn poll_oneoff<'a, 'life0, 'life1, 'async_trait>( &'life0 self, poll: &'life1 mut Poll<'a>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

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

Source

fn sleep<'life0, 'async_trait>( &'life0 self, duration: Duration, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl WasiSched for SyncSched

Available on crate feature sync only.