pub trait TofPackable {
const TOF_PACKET_TYPE: TofPacketType;
const TOF_PACKET_TYPE_ALT: TofPacketType = TofPacketType::Unknown;
// Provided method
fn pack(&self) -> TofPacket
where Self: Serialization { ... }
}
Expand description
Can be wrapped within a TofPacket. To do, we just have to define a packet type
Required Associated Constants§
Provided Associated Constants§
const TOF_PACKET_TYPE_ALT: TofPacketType = TofPacketType::Unknown
Provided Methods§
Sourcefn pack(&self) -> TofPacketwhere
Self: Serialization,
fn pack(&self) -> TofPacketwhere
Self: Serialization,
Wrap myself in a TofPacket
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.