pub trait Containerable {
const SIZE: usize;
// Required methods
fn from_bytes(bytes: &[u8]) -> Self;
fn push_bytes(&self, buf: &mut BytesMut);
}Required Associated Constants§
Required Methods§
Sourcefn from_bytes(bytes: &[u8]) -> Self
fn from_bytes(bytes: &[u8]) -> Self
Returns Self from bytes.
bytes is guaranteed to be Self::SIZE long.
fn push_bytes(&self, buf: &mut BytesMut)
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.