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)

Tuple Fields

0: A

First branch of the type

Right(B)

Tuple Fields

0: 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

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

The actor within which this future runs

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

Add timeout to futures chain. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The future that this type can be converted into.

The item that the future may resolve with.

The actor within which this future runs

Consumes this object and produces a future.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.