Trait ServerPlugin

Source
pub trait ServerPlugin: Send + Sync {
    // Required methods
    fn set_sender(&self, tx: Sender<Box<[u8]>>);
    fn receive<'plug>(
        &self,
        tx: Sender<Box<[u8]>>,
        command: u8,
        reader: &'plug mut BufReader<ReadHalf<'_>>,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'plug>>;
    fn info(&self, message: &str);
}

Required Methods§

Source

fn set_sender(&self, tx: Sender<Box<[u8]>>)

Source

fn receive<'plug>( &self, tx: Sender<Box<[u8]>>, command: u8, reader: &'plug mut BufReader<ReadHalf<'_>>, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'plug>>

Source

fn info(&self, message: &str)

Only used when debugging is enabled.

Implementors§