Trait erg_common::traits::Stream

source ·
pub trait Stream<T>: Sized {
Show 23 methods // Required methods fn payload(self) -> Vec<T>; fn ref_payload(&self) -> &Vec<T>; fn ref_mut_payload(&mut self) -> &mut Vec<T>; // Provided methods fn clear(&mut self) { ... } fn len(&self) -> usize { ... } fn size(&self) -> usize { ... } fn is_empty(&self) -> bool { ... } fn insert(&mut self, idx: usize, elem: T) { ... } fn remove(&mut self, idx: usize) -> T { ... } fn push(&mut self, elem: T) { ... } fn append<S: Stream<T>>(&mut self, s: &mut S) { ... } fn pop(&mut self) -> Option<T> { ... } fn lpop(&mut self) -> Option<T> { ... } fn get(&self, idx: usize) -> Option<&T> { ... } fn get_mut(&mut self, idx: usize) -> Option<&mut T> { ... } fn first(&self) -> Option<&T> { ... } fn first_mut(&mut self) -> Option<&mut T> { ... } fn last(&self) -> Option<&T> { ... } fn last_mut(&mut self) -> Option<&mut T> { ... } fn iter(&self) -> Iter<'_, T> { ... } fn iter_mut(&mut self) -> IterMut<'_, T> { ... } fn take_all(&mut self) -> Vec<T> { ... } fn extend<I>(&mut self, iter: I) where I: IntoIterator<Item = T> { ... }
}

Required Methods§

source

fn payload(self) -> Vec<T>

source

fn ref_payload(&self) -> &Vec<T>

source

fn ref_mut_payload(&mut self) -> &mut Vec<T>

Provided Methods§

source

fn clear(&mut self)

source

fn len(&self) -> usize

source

fn size(&self) -> usize

source

fn is_empty(&self) -> bool

source

fn insert(&mut self, idx: usize, elem: T)

source

fn remove(&mut self, idx: usize) -> T

source

fn push(&mut self, elem: T)

source

fn append<S: Stream<T>>(&mut self, s: &mut S)

source

fn pop(&mut self) -> Option<T>

source

fn lpop(&mut self) -> Option<T>

source

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

source

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

source

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

source

fn first_mut(&mut self) -> Option<&mut T>

source

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

source

fn last_mut(&mut self) -> Option<&mut T>

source

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

source

fn iter_mut(&mut self) -> IterMut<'_, T>

source

fn take_all(&mut self) -> Vec<T>

source

fn extend<I>(&mut self, iter: I)where I: IntoIterator<Item = T>,

Implementors§