pub trait ExactSizeBuf { fn len(&self) -> usize; fn is_empty(&self) -> bool { ... } }
A trait for buffers that know their exact length.
Returns the exact length of the buffer.
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()