pub trait SplitBuffer<'a> {
    type Slices: Iterator<Item = &'a [u8]> + ExactSizeIterator;

    fn slices(&'a self) -> Self::Slices;

    fn is_empty(&'a self) -> bool { ... }
    fn len(&'a self) -> usize { ... }
    fn contiguous(&'a self) -> Cow<'a, [u8]> { ... }
}
Expand description

A trait for buffers that can be composed of multiple non contiguous slices.

Required Associated Types§

Required Methods§

Gets all the slices of this buffer.

Provided Methods§

Returns true if the buffer has a length of 0.

Returns the number of bytes in the buffer.

Returns all the bytes of this buffer in a conitguous slice. This may require allocation and copy if the original buffer is not contiguous.

Implementors§