Skip to main content

Len

Trait Len 

Source
pub trait Len {
    // Required method
    fn len(&self) -> u64;

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

Trait for readers that can report their total length.

Required Methods§

Source

fn len(&self) -> u64

Returns the total number of bytes available.

Provided Methods§

Source

fn is_empty(&self) -> bool

Returns true when the length is zero.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<F> Len for Seekable<F>
where F: Fn() -> RequestBuilder + Send + Sync + 'static,

Source§

fn len(&self) -> u64

Source§

impl<T: Len + AsyncRead> Len for BufReader<T>

Source§

fn len(&self) -> u64

Implementors§