pub trait BufferIntoInner<B>
where B: AsRef<[u8]>,
{ // Required methods fn data_length(&self) -> usize; fn headroom(&self) -> usize; fn buffer_into_inner(self) -> B; fn buffer_get_ref(&self) -> &[u8] ; }
Expand description

Provides access to the underlying data buffer.

Required Methods§

source

fn data_length(&self) -> usize

Returns the data length.

Data length is the amount of bytes from the first header byte to the end of the payload.

source

fn headroom(&self) -> usize

Returns the amount of headroom the buffer currently has.

source

fn buffer_into_inner(self) -> B

Returns the underlying buffer.

source

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

Returns a reference to the underlying buffer.

Implementors§

source§

impl<B, HM> BufferIntoInner<B> for DataBuffer<B, HM>
where B: AsRef<[u8]>, HM: HeaderMetadata + HeaderMetadataMut,