Writable

Trait Writable 

Source
pub trait Writable {
    // Required methods
    fn write(&self, buffer: &mut BytesMut);
    fn len(&self) -> usize;
    fn code(&self) -> u8;
    fn is_empty(&self) -> bool;
}
Expand description

Write something ‘to the wire’.

Required Methods§

Source

fn write(&self, buffer: &mut BytesMut)

Write self to the buffer

Source

fn len(&self) -> usize

Byte-length that would be written if Self::write is called

Source

fn code(&self) -> u8

The (unique) id code of this item

Source

fn is_empty(&self) -> bool

Whether a call to Self::write would write something

Implementors§