pub trait MessageSender<R>: Send {
    fn send(&self, reciptient: R, message: Vec<u8>) -> Result<(), (R, Vec<u8>)>;
}
Expand description

A sender for outgoing messages.

The message sender trait can used by Handlers to send messages based on the received messages. The handler can use this to send any number of messages.

Required Methods

Send the given message bytes to the specified recipient.

Error

If an error occurs, return the intended recipient and message bytes.

Implementors