pub trait Packet: Debug {
const ID: i32;
const NAME: &'static str;
const SIDE: PacketSide;
const STATE: PacketState;
// Provided method
fn encode_with_id(&self, w: impl Write) -> Result<()>
where Self: Encode { ... }
}
Expand description
Required Associated Constants§
Sourceconst SIDE: PacketSide
const SIDE: PacketSide
The side this packet is intended for.
Sourceconst STATE: PacketState
const STATE: PacketState
The state in which this packet is used.
Provided Methods§
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.