Trait breadx::auto::AsByteSequence[][src]

pub trait AsByteSequence: Sized {
    fn size(&self) -> usize;
fn as_bytes(&self, bytes: &mut [u8]) -> usize;
fn from_bytes(bytes: &[u8]) -> Option<(Self, usize)>; fn file_descriptors(&mut self) -> Option<&mut Vec<Fd>> { ... } }
Expand description

Internal use helper trait. This represents an item that can be converted to and from a series of bytes.

Required methods

Get the size needed to store this item in terms of bytes. Higher is better than lower here, since this is mostly used to allocate buffers for items.

Append this item to a sequence of bytes.

Convert a sequence of bytes into this item.

Provided methods

If this item has any file descriptors stored within, this function returns them.

Implementations on Foreign Types

Implementors