Trait tcp_server::Server

source ·
pub trait Server {
    // Required methods
    fn get_identifier(&self) -> &'static str;
    fn check_version(&self, version: &str) -> bool;
    fn get_function<R, W>(
        &self,
        func: &str
    ) -> Option<Box<dyn FuncHandler<R, W>>>
       where R: AsyncReadExt + Unpin + Send,
             W: AsyncWriteExt + Unpin + Send;

    // Provided method
    fn start<'async_trait>(
        &'static self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait { ... }
}

Required Methods§

source

fn get_identifier(&self) -> &'static str

source

fn check_version(&self, version: &str) -> bool

source

fn get_function<R, W>(&self, func: &str) -> Option<Box<dyn FuncHandler<R, W>>>

Provided Methods§

source

fn start<'async_trait>( &'static self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§