Trait ServerBind

Source
pub trait ServerBind:
    Debug
    + Send
    + Sync {
    // Required method
    fn bind<'life0, 'async_trait>(
        &'life0 self,
        timer: ThreadSafeTimer,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature server only.
Expand description

The server bind trait.

Server binders must implement this trait.

Required Methods§

Source

fn bind<'life0, 'async_trait>( &'life0 self, timer: ThreadSafeTimer, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Describe how the server should bind to accept connections from clients.

Implementors§

Source§

impl ServerBind for TcpBind

Available on crate feature tcp-binder only.