Message

Trait Message 

Source
pub trait Message:
    AsAny
    + Send
    + Sync
    + 'static {
    // Provided method
    fn type_id(&self) -> MessageTypeId { ... }
}
Expand description

A type which is used for communicating between publishers and subscribers.

Provided Methods§

Source

fn type_id(&self) -> MessageTypeId

Returns the type id of the message.

Trait Implementations§

Source§

impl<F: FnMut(Arc<dyn Message>)> IntoMessageHandler<dyn Message> for F

Source§

type Handler = MessageHandler<dyn Message, F>

Source§

fn into_message_handler(self) -> Self::Handler

Converts the type into the specific ErasedMessageHandler.
Source§

impl<F: FnMut(Arc<dyn Message>)> IntoMessageHandler<dyn Message> for MessageHandler<dyn Message, F>

Source§

type Handler = MessageHandler<dyn Message, F>

Source§

fn into_message_handler(self) -> Self::Handler

Converts the type into the specific ErasedMessageHandler.

Implementors§