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§
Sourcefn type_id(&self) -> MessageTypeId
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
impl<F: FnMut(Arc<dyn Message>)> IntoMessageHandler<dyn Message> for F
type Handler = MessageHandler<dyn Message, F>
Source§fn into_message_handler(self) -> Self::Handler
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>
impl<F: FnMut(Arc<dyn Message>)> IntoMessageHandler<dyn Message> for MessageHandler<dyn Message, F>
type Handler = MessageHandler<dyn Message, F>
Source§fn into_message_handler(self) -> Self::Handler
fn into_message_handler(self) -> Self::Handler
Converts the type into the specific
ErasedMessageHandler.