pub trait ExactSizeBuf {
    fn len(&self) -> usize;

    fn is_empty(&self) -> bool { ... }
}
Expand description

A trait for buffers that know their exact length.

Required Methods

Returns the exact length of the buffer.

Provided Methods

Returns true if the buffer is empty.

This method has a default implementation using ExactSizeBuf::len(), so you don’t need to implement it yourself.

Implementations on Foreign Types

Implementors