[][src]Trait reactor_trait::Reactor

pub trait Reactor {
    pub fn register(
        &self,
        socket: IOHandle
    ) -> Result<Box<dyn AsyncIOHandle + Send>>;
#[must_use] pub fn sleep<'life0, 'async_trait>(
        &'life0 self,
        dur: Duration
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

A common interface for registering IO handles in a reactor.

Required methods

pub fn register(
    &self,
    socket: IOHandle
) -> Result<Box<dyn AsyncIOHandle + Send>>
[src]

Register a synchronous handle, returning an asynchronous one

#[must_use]pub fn sleep<'life0, 'async_trait>(
    &'life0 self,
    dur: Duration
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Sleep for the given duration

Loading content...

Implementors

Loading content...