Enum ntex_util::future::Either [−][src]
pub enum Either<A, B> {
Left(A),
Right(B),
}Expand description
Combines two different futures, streams, or sinks having the same associated types into a single type.
Variants
Left(A)
First branch of the type
Right(B)
Second branch of the type
Implementations
Convert &Either<L, R> to Either<&L, &R>.
Factor out a homogeneous type from an either of pairs.
Here, the homogeneous type is the first element of the pairs.
Factor out a homogeneous type from an either of pairs.
Here, the homogeneous type is the second element of the pairs.
Extract the value of an either over two equivalent types.
Trait Implementations
Either implements Error if both A and B implement it.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl<A, B> RefUnwindSafe for Either<A, B> where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> UnwindSafe for Either<A, B> where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
into_future)The output that the future will produce on completion.
type Future = F
type Future = F
into_future)Which kind of future are we turning this into?
into_future)Creates a future from a value.
