Skip to main content

HasRestLen

Trait HasRestLen 

Source
pub trait HasRestLen {
    // Required method
    fn rest_len(&self) -> usize;
}
Expand description

Allows iterators to report the remaining, unparsed bytes within an iterator.

This is for iterators that parse items from &[u8] buffers or similar.

Required Methods§

Source

fn rest_len(&self) -> usize

Returns the number of bytes (or elements, abstractly) that have not yet been parsed by this iterator.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§