Enum actix::fut::Either [−][src]
pub enum Either<A, B> {
Left(A),
Right(B),
}
Expand description
Combines two different futures yielding the same item and error types into a single type.
Variants
Left(A)
First branch of the type
Right(B)
Second branch of the type
Implementations
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
impl<A, B> ActorFuture for Either<A, B> where
A: ActorFuture,
B: ActorFuture<Output = A::Output, Actor = A::Actor>,
impl<A, B> ActorFuture for Either<A, B> where
A: ActorFuture,
B: ActorFuture<Output = A::Output, Actor = A::Actor>,
The type of value that this future will resolved with if it is successful. Read more
fn poll(
self: Pin<&mut Self>,
act: &mut A::Actor,
ctx: &mut <A::Actor as Actor>::Context,
task: &mut Context<'_>
) -> Poll<A::Output>
Map this future’s result to a different type, returning a new future of the resulting type. Read more
Chain on a computation for when a future finished, passing the result of
the future to the provided closure f
. 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
type Future = F
type Future = F
The future that this type can be converted into.
type Output = <F as ActorFuture>::Output
type Output = <F as ActorFuture>::Output
The item that the future may resolve with.
type Actor = <F as ActorFuture>::Actor
type Actor = <F as ActorFuture>::Actor
The actor within which this future runs
Consumes this object and produces a future.