Trait koto_runtime::KotoIterator

source ·
pub trait KotoIterator: Iterator<Item = KIteratorOutput> + KotoSend + KotoSync {
    // Required method
    fn make_copy(&self) -> Result<KIterator>;

    // Provided methods
    fn is_bidirectional(&self) -> bool { ... }
    fn next_back(&mut self) -> Option<KIteratorOutput> { ... }
}
Expand description

The trait used to implement iterators in Koto

See KIterator.

Required Methods§

source

fn make_copy(&self) -> Result<KIterator>

Returns a copy of the iterator that (when possible), will produce the same output

Provided Methods§

source

fn is_bidirectional(&self) -> bool

Returns true if the iterator supports reversed iteration via next_back

source

fn next_back(&mut self) -> Option<KIteratorOutput>

Returns the next item produced by iterating backwards

Returns None when no more items are available in reverse order.

Implementors§