ImmutableStream

Trait ImmutableStream 

Source
pub trait ImmutableStream<T>: Sized {
    // Required methods
    fn ref_payload(&self) -> &[T];
    fn capacity(&self) -> usize;

    // Provided methods
    fn len(&self) -> usize { ... }
    fn size(&self) -> usize { ... }
    fn is_empty(&self) -> bool { ... }
    fn get(&self, idx: usize) -> Option<&T> { ... }
    fn first(&self) -> Option<&T> { ... }
    fn last(&self) -> Option<&T> { ... }
    fn iter(&self) -> Iter<'_, T> { ... }
}

Required Methods§

Source

fn ref_payload(&self) -> &[T]

Source

fn capacity(&self) -> usize

Provided Methods§

Source

fn len(&self) -> usize

Source

fn size(&self) -> usize

Source

fn is_empty(&self) -> bool

Source

fn get(&self, idx: usize) -> Option<&T>

Source

fn first(&self) -> Option<&T>

Source

fn last(&self) -> Option<&T>

Source

fn iter(&self) -> Iter<'_, T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§