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)
Object Safety§
This trait is not object safe.