Skip to main content

NetMessage

Trait NetMessage 

Source
pub trait NetMessage:
    Serialize
    + DeserializeOwned
    + Clone
    + Send
    + Sync
    + 'static {
    const TYPE_PATH: &'static str;
    const WIRE_ID: u64;
}
Expand description

Trait implemented by typed network messages.

#[netmsg] generates this automatically for concrete message structs.

Required Associated Constants§

Source

const TYPE_PATH: &'static str

Fully qualified type path used to produce a stable wire identifier.

Source

const WIRE_ID: u64

Stable wire identifier derived from TYPE_PATH.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§