pub trait FromPacket: Packet {
type T;
// Required method
fn from_packet(&self) -> Self::T;
}Expand description
Used to convert on-the-wire packets to their #[packet] equivalent.
Required Associated Types§
Required Methods§
Sourcefn from_packet(&self) -> Self::T
fn from_packet(&self) -> Self::T
Converts a wire-format packet to #[packet] struct format.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".