Skip to main content

PerlIterator

Trait PerlIterator 

Source
pub trait PerlIterator: Send + Sync {
    // Required method
    fn next_item(&self) -> Option<PerlValue>;

    // Provided method
    fn collect_all(&self) -> Vec<PerlValue> { ... }
}
Expand description

Pull-based lazy iterator. Sources (frs, drs) produce one; transform stages (rev) wrap one; terminals (e/fore) consume one item at a time.

Required Methods§

Source

fn next_item(&self) -> Option<PerlValue>

Return the next item, or None when exhausted.

Provided Methods§

Source

fn collect_all(&self) -> Vec<PerlValue>

Collect all remaining items into a Vec.

Trait Implementations§

Source§

impl Debug for dyn PerlIterator

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Implementors§