pub trait Stream<T> {
// Required methods
fn peek(&mut self) -> Option<&T>;
fn next(&mut self) -> Option<&T>;
fn while_if<F>(&mut self, cond: F)
where F: Fn(&T) -> bool;
fn next_if<F>(&mut self, cond: F) -> bool
where F: Fn(&T) -> bool;
fn expect(&mut self, it: &[T]) -> bool;
fn position(&self) -> usize;
fn finish(&self) -> bool;
fn skip(&mut self);
fn skip_by(&mut self, size: usize);
fn anchor(&mut self);
fn read(&mut self) -> &[T];
}Required Methods§
fn peek(&mut self) -> Option<&T>
fn next(&mut self) -> Option<&T>
fn while_if<F>(&mut self, cond: F)
fn next_if<F>(&mut self, cond: F) -> bool
fn expect(&mut self, it: &[T]) -> bool
fn position(&self) -> usize
fn finish(&self) -> bool
fn skip(&mut self)
fn skip_by(&mut self, size: usize)
fn anchor(&mut self)
fn read(&mut self) -> &[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.