Skip to main content

AsyncReady

Trait AsyncReady 

Source
pub trait AsyncReady {
    // Required method
    fn ready<'life0, 'async_trait>(
        &'life0 self,
        interest: Interest,
    ) -> Pin<Box<dyn Future<Output = Result<Ready>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature network only.
Expand description

Asynchronous IO readiness.

Like tokio::io::AsyncRead or tokio::io::AsyncWrite, but for readiness events.

Required Methods§

Source

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

Checks for IO readiness.

See TcpStream::ready for details.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl AsyncReady for TcpStream

Source§

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

Source§

impl<S> AsyncReady for SslStream<S>
where S: AsyncReady + Sync,

Source§

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

Implementors§