VarBytes

Type Alias VarBytes 

Source
pub type VarBytes<V> = Header<Vec<u8>, V>;
Expand description

Buffer type which can be owned or a view.

Aliased Type§

pub enum VarBytes<V> {
    Repr(Box<Vec<u8>>),
    Raw(V),
}

Variants§

§

Repr(Box<Vec<u8>>)

Owned, in-memory representation of a header.

§

Raw(V)

Packed representation of a header, read from an existing buffer.

Trait Implementations§

Source§

impl<V: ByteSliceMut> AsMut<[u8]> for VarBytes<V>

Source§

fn as_mut(&mut self) -> &mut [u8]

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<V: ByteSlice> AsRef<[u8]> for VarBytes<V>

Source§

fn as_ref(&self) -> &[u8]

Converts this type into a shared reference of the (usually inferred) input type.