pub trait AppMessageExt {
// Required methods
fn add_message<M>(&mut self) -> MessageRegistration<'_, M>
where M: Message + Serialize + DeserializeOwned;
fn is_message_registered<M>(&self) -> bool
where M: Message;
fn add_message_custom_serde<M>(
&mut self,
serialize_fns: SerializeFns<M>,
) -> MessageRegistration<'_, M>
where M: Message;
}Expand description
Add messages or triggers to the list of types that can be sent.
Required Methods§
Sourcefn add_message<M>(&mut self) -> MessageRegistration<'_, M>
fn add_message<M>(&mut self) -> MessageRegistration<'_, M>
Register a regular message type M.
This adds MessageSender<M> and MessageReceiver<M> components.
fn is_message_registered<M>(&self) -> boolwhere
M: Message,
Sourcefn add_message_custom_serde<M>(
&mut self,
serialize_fns: SerializeFns<M>,
) -> MessageRegistration<'_, M>where
M: Message,
fn add_message_custom_serde<M>(
&mut self,
serialize_fns: SerializeFns<M>,
) -> MessageRegistration<'_, M>where
M: Message,
Register a regular message type M with custom serialization functions.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.