pub trait Packet {
const ID: u16;
const NAME: &'static str;
const MASSIVE: bool;
const ENCRYPTED: bool;
}Expand description
Defines associated constants with this packet, which can be used to turn this struct into a packet.
If this struct also implements skrillax_serde::ByteSize
and skrillax_serde::Serialize,
it will automatically gain AsPacket. If it implements
skrillax_serde::Deserialize, it will automatically gain TryFromPacket.
This can automatically be derived with the derive feature.
Required Associated Constants§
Sourceconst NAME: &'static str
const NAME: &'static str
Provides a more readable name for the given packet. This is usually just the struct name.
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.