Trait mutnet::data_buffer::BufferIntoInner
source · pub trait BufferIntoInner<B>{
// 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§
sourcefn data_length(&self) -> usize
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.
sourcefn buffer_into_inner(self) -> B
fn buffer_into_inner(self) -> B
Returns the underlying buffer.
sourcefn buffer_get_ref(&self) -> &[u8] ⓘ
fn buffer_get_ref(&self) -> &[u8] ⓘ
Returns a reference to the underlying buffer.