opentitanlib::proxy

Trait CommandHandler

Source
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§