pub trait CommandHandler<Msg, E: ExtraEventHandler> {
    // Required method
    fn execute_cmd(
        &mut self,
        conn_token: Token,
        registry: &Registry,
        extra_event_handler: &mut E,
        msg: &Msg
    ) -> Result<Msg>;

    // Provided methods
    fn register_nonblocking_help(
        &self,
        _registry: &Registry,
        _token: Token
    ) -> Result<()> { ... }
    fn nonblocking_help(&self) -> Result<()> { ... }
}
Expand description

Interface for handlers of protocol messages, responding to each message with a single instance of the same protocol message.

Required Methods§

source

fn execute_cmd( &mut self, conn_token: Token, registry: &Registry, extra_event_handler: &mut E, msg: &Msg ) -> Result<Msg>

Provided Methods§

source

fn register_nonblocking_help( &self, _registry: &Registry, _token: Token ) -> Result<()>

source

fn nonblocking_help(&self) -> Result<()>

Implementors§