Struct handy_io::pattern::combinators::IterFold [] [src]

pub struct IterFold<I, F, T>(_, _, _);

A pattern for the fold combinator, folding values of the patterns contained in a iterator to produce final value.

This pattern is created by calling Iter::fold method.

Methods

impl<I, F, T> IterFold<I, F, T>
[src]

Trait Implementations

impl<R: Read, I, F, T> ReadFrom<R> for IterFold<I, F, T> where
    I: Iterator,
    I::Item: ReadFrom<R>,
    F: Fn(T, <I::Item as Pattern>::Value) -> T, 
[src]

The future to read a value of the pattern from R.

Creates a future instance to read a value of the pattern from reader.

Creates a future instance to read a value of the pattern from reader. Read more

Scynchronously reading a value of the pattern from reader. Read more

Returns the boxed version of this pattern.

impl<W: Write, I, F, T> WriteTo<W> for IterFold<I, F, T> where
    I: Iterator,
    I::Item: WriteTo<W>,
    F: Fn(T, <I::Item as Pattern>::Value) -> T, 
[src]

The future to write a value of the pattern to W.

Creates a future instance to write a value of the pattern to writer.

Creates a future instance to write a value of the pattern to writer. Read more

Scynchronously writing a value of the pattern to writer. Read more

Returns the boxed version of this pattern.

impl<I: Debug, F: Debug, T: Debug> Debug for IterFold<I, F, T>
[src]

Formats the value using the given formatter.

impl<I, P, F, T> Pattern for IterFold<I, F, T> where
    I: Iterator<Item = P>,
    P: Pattern,
    F: Fn(T, P::Value) -> T, 
[src]

The value type associated to the pattern.

Takes a closure which maps a Result<Self::Value> to a pattern, and creates a pattern which calls that closure on the evaluation result of self. Read more

Takes a closure which maps a value to a pattern, and creates a pattern which calls that closure if the evaluation of self was succeeded. Read more

Takes a closure which maps an error to a pattern, and creates a pattern which calls that closure if the evaluation of self failed. Read more

Takes a closure which maps a value to another value, and creates a pattern which calls that closure on the evaluated value of self. Read more

Takes two patterns and creates a new pattern over both in sequence. Read more

Creates Repeat pattern to represent an infinite stream of this pattern.