logo
pub trait MessageHandler<ParentModel: Model> {
    type Msg;
    type Sender;

    fn init(
        parent_model: &ParentModel,
        parent_sender: Sender<ParentModel::Msg>
    ) -> Self; fn send(&self, msg: Self::Msg); fn sender(&self) -> Self::Sender; }
Expand description

A message handler that can be used in situations where a RelmWorker isn’t flexible enough.

Required Associated Types

The message type of this message handler.

The sender type that can be used to send a message to a RelmMsgHandler.

Required Methods

Initialize this message handler.

Sends a message to the message handler.

Get a sender for sending messages to this RelmMsgHandler.

Implementors