Enum bidule::Either [] [src]

pub enum Either<A, B> {
    Left(A),
    Right(B),
}

Either one or another type.

This type is especially useful for zipping and unzipping streams. If a stream has a type like Stream<Either<A, B>>, it means you can unzip it and get two streams: Stream<A> and Stream<B>.

Variants

Trait Implementations

impl<A: Clone, B: Clone> Clone for Either<A, B>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl<A: Debug, B: Debug> Debug for Either<A, B>
[src]

[src]

Formats the value using the given formatter.

impl<A: Eq, B: Eq> Eq for Either<A, B>
[src]

impl<A: PartialEq, B: PartialEq> PartialEq for Either<A, B>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.