Trait HostPollable

Source
pub trait HostPollable: Sized {
    // Required methods
    fn ready(&mut self, self_: Resource<DynPollable>) -> Result<bool, Error>;
    fn block(&mut self, self_: Resource<DynPollable>) -> Result<(), Error>;
    fn drop(&mut self, rep: Resource<DynPollable>) -> Result<(), Error>;
}

Required Methods§

Source

fn ready(&mut self, self_: Resource<DynPollable>) -> Result<bool, Error>

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<DynPollable>) -> Result<(), Error>

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<DynPollable>) -> Result<(), Error>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> HostPollable for IoImpl<T>
where T: IoView,

Source§

fn ready(&mut self, pollable: Resource<DynPollable>) -> Result<bool, Error>

Source§

fn block(&mut self, pollable: Resource<DynPollable>) -> Result<(), Error>

Source§

fn drop(&mut self, pollable: Resource<DynPollable>) -> Result<(), Error>

Source§

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

Source§

fn ready(&mut self, self_: Resource<DynPollable>) -> Result<bool, Error>

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<DynPollable>) -> Result<(), Error>

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<DynPollable>) -> Result<(), Error>

Implementors§