Trait erg_common::traits::Stream
source · pub trait Stream<T>: Sized {
Show 26 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> { ... }
fn split_off(&mut self, at: usize) -> Vec<T> { ... }
fn retain(&mut self, f: impl FnMut(&T) -> bool) { ... }
fn concat(self, other: Self) -> Self { ... }
}
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>,
fn split_off(&mut self, at: usize) -> Vec<T>
sourcefn retain(&mut self, f: impl FnMut(&T) -> bool)
fn retain(&mut self, f: impl FnMut(&T) -> bool)
Remove all elements that don’t satisfy the predicate.
fn concat(self, other: Self) -> Self
Object Safety§
This trait is not object safe.