Skip to main content

ControlHandler

Trait ControlHandler 

Source
pub(crate) trait ControlHandler {
    type CtrlMsg;
    type CtrlCmd;

    // Required methods
    fn handle_cmd(&mut self, cmd: Self::CtrlCmd) -> StdResult<(), ReactorError>;
    fn handle_msg(&mut self, msg: Self::CtrlMsg) -> StdResult<(), ReactorError>;
}
Expand description

Trait implemented by types that can handle control messages and commands.

Required Associated Types§

Source

type CtrlMsg

The type of control message expected by the forward reactor.

Source

type CtrlCmd

The type of control command expected by the forward reactor.

Required Methods§

Source

fn handle_cmd(&mut self, cmd: Self::CtrlCmd) -> StdResult<(), ReactorError>

Handle a control command.

Source

fn handle_msg(&mut self, msg: Self::CtrlMsg) -> StdResult<(), ReactorError>

Handle a control message.

Implementors§