[][src]Struct runestick::Iterator

pub struct Iterator { /* fields omitted */ }

An owning iterator.

Implementations

impl Iterator[src]

pub fn from<T>(name: &'static str, iter: T) -> Self where
    T: IteratorTrait, 
[src]

Construct a new owning iterator.

The name is only intended to identify the iterator in case of errors.

pub fn from_double_ended<T>(name: &'static str, iter: T) -> Self where
    T: DoubleEndedIteratorTrait, 
[src]

Construct a new double-ended owning iterator, with a human-readable name.

The name is only intended to identify the iterator in case of errors.

pub fn empty() -> Self[src]

Creates an iterator that yields nothing.

pub fn once(value: Value) -> Self[src]

Creates an iterator that yields an element exactly once.

pub fn size_hint(&self) -> (usize, Option<usize>)[src]

Get the size hint for the iterator.

pub fn next(&mut self) -> Result<Option<Value>, VmError>[src]

Get the next value out of the iterator.

pub fn next_back(&mut self) -> Result<Option<Value>, VmError>[src]

Get the next back value out of the iterator.

pub fn enumerate(self) -> Self[src]

Enumerate the iterator.

pub fn map(self, map: Function) -> Self[src]

Map the iterator using the given function.

pub fn flat_map(self, map: Function) -> Self[src]

Map and flatten the iterator using the given function.

pub fn filter(self, filter: Function) -> Self[src]

Filter the iterator using the given function.

pub fn find(mut self: Self, find: Function) -> Result<Option<Value>, VmError>[src]

Find the first matching value in the iterator using the given function.

pub fn all(mut self: Self, find: Function) -> Result<bool, VmError>[src]

Test if all entries in the iterator matches the given predicate.

pub fn any(mut self: Self, find: Function) -> Result<bool, VmError>[src]

Test if any entry in the iterator matches the given predicate.

pub fn chain(self, other: Value) -> Result<Self, VmError>[src]

Chain this iterator with another.

pub fn chain_raw(self, other: Self) -> Result<Self, VmError>[src]

Chain this iterator with another.

pub fn rev(self) -> Result<Self, VmError>[src]

Map the iterator using the given function.

pub fn skip(self, n: usize) -> Self[src]

Skip over the given number of elements from the iterator.

pub fn take(self, n: usize) -> Self[src]

Take the given number of elements from the iterator.

pub fn count(&mut self) -> Result<usize, VmError>[src]

Count the number of elements remaining in the iterator.

pub fn peekable(self) -> Self[src]

Create a peekable iterator.

pub fn peek(&mut self) -> Result<Option<Value>, VmError>[src]

Peek the next element if supported.

pub fn collect<T>(mut self: Self) -> Result<Vec<T>, VmError> where
    T: FromValue
[src]

Collect results from the iterator.

pub fn fold(
    mut self: Self,
    mut accumulator: Value,
    f: Function
) -> Result<Value, VmError>
[src]

Integrate over the iterator, using accumulator as the initial value and then forwarding the result of each stage.

pub fn product(self) -> Result<Value, VmError>[src]

Compute the product under the assumption of a homogeonous iterator of type T.

pub fn sum(self) -> Result<Value, VmError>[src]

Compute the sum under the assumption of a homogeonous iterator of type T.

Trait Implementations

impl Debug for Iterator[src]

impl From<Iterator> for Value[src]

impl FromValue for Iterator[src]

impl InstallWith for Iterator[src]

impl Named for Iterator[src]

impl ToValue for Iterator[src]

impl TypeOf for Iterator[src]

impl<'a> UnsafeFromValue for &'a Iterator[src]

type Output = *const Iterator

The output type from the unsafe coercion.

type Guard = RawRef

The raw guard returned. Read more

impl<'a> UnsafeFromValue for &'a mut Iterator[src]

type Output = *mut Iterator

The output type from the unsafe coercion.

type Guard = RawMut

The raw guard returned. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.