Trait wasmtime_wasi_http::bindings::io::poll::HostPollable

source ·
pub trait HostPollable {
    // Required methods
    fn ready<'life0, 'async_trait>(
        &'life0 mut self,
        self_: Resource<Pollable>,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn block<'life0, 'async_trait>(
        &'life0 mut self,
        self_: Resource<Pollable>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn drop(&mut self, rep: Resource<Pollable>) -> Result<(), Error>;
}

Required Methods§

source

fn ready<'life0, 'async_trait>( &'life0 mut self, self_: Resource<Pollable>, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Return the readiness of a pollable. This function never blocks.

Returns true when the pollable is ready, and false otherwise.

source

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

block returns immediately if the pollable is ready, and otherwise blocks until ready.

This function is equivalent to calling poll.poll on a list containing only this pollable.

source

fn drop(&mut self, rep: Resource<Pollable>) -> Result<(), Error>

Implementations on Foreign Types§

source§

impl<_T> HostPollable for &mut _T
where _T: HostPollable + Send + ?Sized,

source§

fn ready<'life0, 'async_trait>( &'life0 mut self, self_: Resource<Pollable>, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, &mut _T: 'async_trait,

Return the readiness of a pollable. This function never blocks.

Returns true when the pollable is ready, and false otherwise.

source§

fn block<'life0, 'async_trait>( &'life0 mut self, self_: Resource<Pollable>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, &mut _T: 'async_trait,

block returns immediately if the pollable is ready, and otherwise blocks until ready.

This function is equivalent to calling poll.poll on a list containing only this pollable.

source§

fn drop(&mut self, rep: Resource<Pollable>) -> Result<(), Error>

Implementors§

source§

impl<T> HostPollable for WasiImpl<T>
where T: WasiView,