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§
Required Methods§
Sourcefn handle_cmd(&mut self, cmd: Self::CtrlCmd) -> StdResult<(), ReactorError>
fn handle_cmd(&mut self, cmd: Self::CtrlCmd) -> StdResult<(), ReactorError>
Handle a control command.
Sourcefn handle_msg(&mut self, msg: Self::CtrlMsg) -> StdResult<(), ReactorError>
fn handle_msg(&mut self, msg: Self::CtrlMsg) -> StdResult<(), ReactorError>
Handle a control message.