Trait ExactSizeBuf
Other items inwebrtc_util::marshal::exact_size_buf
pub trait ExactSizeBuf { fn len(&self) -> usize; fn is_empty(&self) -> bool { ... } }
A trait for buffers that know their exact length.
fn len(&self) -> usize
Returns the exact length of the buffer.
fn is_empty(&self) -> bool
Returns true if the buffer is empty.
true
This method has a default implementation using ExactSizeBuf::len(), so you don’t need to implement it yourself.
ExactSizeBuf::len()
impl ExactSizeBuf for Bytes
impl ExactSizeBuf for BytesMut
impl ExactSizeBuf for [u8]
impl<T, U> ExactSizeBuf for Chain<T, U> where T: ExactSizeBuf, U: ExactSizeBuf,
impl<T> ExactSizeBuf for Take<T> where T: ExactSizeBuf,