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

pub struct AndThen<P, F>(_, _);

A pattern for the and_then combinator, chaining a pattern on the end of another pattern which evaluated successfully.

This pattern is created by calling Pattern::and_then method.

Methods

impl<P, F> AndThen<P, F>
[src]

Trait Implementations

impl<R: Read, P0, P1, F> ReadFrom<R> for AndThen<P0, F> where
    P0: ReadFrom<R>,
    P1: ReadFrom<R>,
    F: FnOnce(P0::Value) -> P1, 
[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, P0, P1, F> WriteTo<W> for AndThen<P0, F> where
    P0: WriteTo<W>,
    P1: WriteTo<W>,
    F: FnOnce(P0::Value) -> P1, 
[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<P: Debug, F: Debug> Debug for AndThen<P, F>
[src]

Formats the value using the given formatter.

impl<P0, P1, F> Pattern for AndThen<P0, F> where
    P0: Pattern,
    P1: Pattern,
    F: FnOnce(P0::Value) -> P1, 
[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.