Trait Message

Source
pub trait Message:
    Send
    + Sync
    + Serialize
    + DeserializeOwned
    + Clone
    + 'static { }
Expand description

Any data type that can be used as a Host <-> Mod message

Must be Clone, Send, and Sync, and must be (de)serializable with serde.

bevy_wasm uses bincode for serialization, so it’s relatively fast.

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.

Implementors§

Source§

impl<T> Message for T
where T: Send + Sync + Serialize + DeserializeOwned + Clone + 'static,