Type Alias VecBuf

Source
pub type VecBuf = Vec<u8>;
Available on crate feature alloc only.
Expand description

Type alias for alloc::Vec<u8>

Aliased Type§

pub struct VecBuf { /* private fields */ }

Trait Implementations§

Source§

impl Buffer for VecBuf

Source§

fn push(&mut self, b: u8) -> Result<(), OutOfMemory>

Appends a byte to the back of the vector. Read more
Source§

fn truncate(&mut self, len: usize)

Shortens the vector, keeping the first len elements and dropping the rest.
Source§

fn clear(&mut self)

Clears the vector, removing all values.
Source§

fn extend_from_slice(&mut self, other: &[u8]) -> Result<(), OutOfMemory>

Clones and appends all bytes in a slice to the vector. Read more