pub trait IteratorTrait: 'static {
    // Required methods
    fn size_hint(&self) -> (usize, Option<usize>);
    fn next(&mut self) -> VmResult<Option<Value>>;
}
Expand description

The trait for interacting with an iterator.

This has a blanket implementation, and is primarily used to restrict the arguments that can be used in Iterator::from.

Required Methods§

source

fn size_hint(&self) -> (usize, Option<usize>)

Size hint of the iterator.

source

fn next(&mut self) -> VmResult<Option<Value>>

Get the next value out of the iterator.

Implementors§

source§

impl<T> IteratorTrait for T
where T: 'static + Iterator, T::Item: ToValue,