pub trait MsgHandler {
    fn handler_type(&self) -> MsgHandlerType;

    fn handle_msg(&mut self, _msg: &Message) -> Option<MsgHandlerResult> { ... }
}
Expand description

A trait for handling incoming messages.

Required Methods

Type of messages for which the handler will be called

Note: The return value of this function might be cached, so it must return the same value all the time.

Provided Methods

Function to be called if the message matches the MsgHandlerType

Implementors