pub trait HeaderLen {
const MINIMUM_LENGTH: usize;
// Required method
fn packet_length(&self) -> usize;
}Expand description
Base trait for header/packet types.
Required Associated Constants§
Sourceconst MINIMUM_LENGTH: usize
const MINIMUM_LENGTH: usize
The minimum number of bytes a packet of this kind occupies when serialised.
Required Methods§
Sourcefn packet_length(&self) -> usize
fn packet_length(&self) -> usize
The number of bytes which this packet would occupy when serialised.
This should always return a value greater than or equal to
Header::MINIMUM_LENGTH.
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.