pub trait IsPacketId:
PrimInt
+ One
+ Bounded
+ Debug
+ Display
+ Hash
+ Eq
+ Serialize
+ 'static {
type Buffer: AsRef<[u8]> + AsMut<[u8]> + Clone + Default + Eq;
// Required methods
fn to_buffer(&self) -> Self::Buffer;
fn from_buffer(buf: &[u8]) -> Self;
}
Expand description
Packet ID types with associated buffer operations
Required Associated Types§
Required Methods§
Sourcefn from_buffer(buf: &[u8]) -> Self
fn from_buffer(buf: &[u8]) -> Self
Parse packet ID from buffer
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.