Trait wasmtime_wasi::bindings::sync::io::poll::HostPollable
source · pub trait HostPollable {
// Required methods
fn ready(&mut self, self_: Resource<Pollable>) -> Result<bool>;
fn block(&mut self, self_: Resource<Pollable>) -> Result<()>;
fn drop(&mut self, rep: Resource<Pollable>) -> Result<()>;
}
Required Methods§
sourcefn ready(&mut self, self_: Resource<Pollable>) -> Result<bool>
fn ready(&mut self, self_: Resource<Pollable>) -> Result<bool>
Return the readiness of a pollable. This function never blocks.
Returns true
when the pollable is ready, and false
otherwise.
sourcefn block(&mut self, self_: Resource<Pollable>) -> Result<()>
fn block(&mut self, self_: Resource<Pollable>) -> Result<()>
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.
fn drop(&mut self, rep: Resource<Pollable>) -> Result<()>
Implementations on Foreign Types§
source§impl<_T: HostPollable + ?Sized> HostPollable for &mut _T
impl<_T: HostPollable + ?Sized> HostPollable for &mut _T
source§fn ready(&mut self, self_: Resource<Pollable>) -> Result<bool>
fn ready(&mut self, self_: Resource<Pollable>) -> Result<bool>
Return the readiness of a pollable. This function never blocks.
Returns true
when the pollable is ready, and false
otherwise.
source§fn block(&mut self, self_: Resource<Pollable>) -> Result<()>
fn block(&mut self, self_: Resource<Pollable>) -> Result<()>
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.