pub trait PacketHeader: Debug + Sized {
    fn len() -> usize;
    fn from_bytes(bytes: Bytes<'_>) -> Result<Self>;
    fn body_len(&self) -> usize;
    fn flags(&self) -> &Flags;
    fn set_flags(&mut self, flags: Flags);
    fn id(&self) -> u32;
    fn set_id(&mut self, id: u32);
}

Required Methods§

bytes.len() == Self::len()

Returns the length of the body

Returns the internal flags.

Note

This is returned as a number so that outside of this crate nobody can rely on the information contained within.

Implementors§