Enum handy_io::pattern::Branch [] [src]

pub enum Branch<A, B = A, C = A, D = A, E = A, F = A, G = A, H = A> {
    A(A),
    B(B),
    C(C),
    D(D),
    E(E),
    F(F),
    G(G),
    H(H),
}

A pattern which represents branches in a pattern.

All branches must have the same resulting value type.

Variants

Trait Implementations

impl<R: Read, A, B, C, D, E, F, G, H> ReadFrom<R> for Branch<A, B, C, D, E, F, G, H> where
    A: ReadFrom<R>,
    B: ReadFrom<R, Value = A::Value>,
    C: ReadFrom<R, Value = A::Value>,
    D: ReadFrom<R, Value = A::Value>,
    E: ReadFrom<R, Value = A::Value>,
    F: ReadFrom<R, Value = A::Value>,
    G: ReadFrom<R, Value = A::Value>,
    H: ReadFrom<R, Value = A::Value>, 
[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, A, B, C, D, E, F, G, H> WriteTo<W> for Branch<A, B, C, D, E, F, G, H> where
    A: WriteTo<W>,
    B: WriteTo<W, Value = A::Value>,
    C: WriteTo<W, Value = A::Value>,
    D: WriteTo<W, Value = A::Value>,
    E: WriteTo<W, Value = A::Value>,
    F: WriteTo<W, Value = A::Value>,
    G: WriteTo<W, Value = A::Value>,
    H: WriteTo<W, Value = A::Value>, 
[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<A, B, C, D, E, F, G, H> Pattern for Branch<A, B, C, D, E, F, G, H> where
    A: Pattern,
    B: Pattern<Value = A::Value>,
    C: Pattern<Value = A::Value>,
    D: Pattern<Value = A::Value>,
    E: Pattern<Value = A::Value>,
    F: Pattern<Value = A::Value>,
    G: Pattern<Value = A::Value>,
    H: Pattern<Value = A::Value>, 
[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.

impl<A, B, C, D, E, F, G, H> Future for Branch<A, B, C, D, E, F, G, H> where
    A: Future,
    B: Future<Item = A::Item, Error = A::Error>,
    C: Future<Item = A::Item, Error = A::Error>,
    D: Future<Item = A::Item, Error = A::Error>,
    E: Future<Item = A::Item, Error = A::Error>,
    F: Future<Item = A::Item, Error = A::Error>,
    G: Future<Item = A::Item, Error = A::Error>,
    H: Future<Item = A::Item, Error = A::Error>, 
[src]

The type of value that this future will resolved with if it is successful. Read more

The type of error that this future will resolve with if it fails in a normal fashion. Read more

Query this future to see if its value has become available, registering interest if it is not. Read more

Block the current thread until this future is resolved. Read more

Convenience function for turning this future into a trait object which is also Send. Read more

Map this future's result to a different type, returning a new future of the resulting type. Read more

Map this future's error to a different error, returning a new future. Read more

Map this future's error to any error implementing From for this future's Error, returning a new future. Read more

Chain on a computation for when a future finished, passing the result of the future to the provided closure f. Read more

Execute another future after this one has resolved successfully. Read more

Execute another future if this one resolves with an error. Read more

Waits for either one of two futures to complete. Read more

Waits for either one of two differently-typed futures to complete. Read more

Joins the result of two futures, waiting for them both to complete. Read more

Same as join, but with more futures.

Same as join, but with more futures.

Same as join, but with more futures.

Convert this future into a single element stream. Read more

Flatten the execution of this future when the successful result of this future is itself another future. Read more

Flatten the execution of this future when the successful result of this future is a stream. Read more

Fuse a future such that poll will never again be called once it has completed. Read more

Catches unwinding panics while polling the future. Read more

Create a cloneable handle to this future where all handles will resolve to the same result. Read more