Enum actix_net::either::EitherService[][src]

pub enum EitherService<A, B> {
    A(A),
    B(B),
}

Combine two different service types into a single type.

Both services must be of the same request, response, and error types. EitherService is useful for handling conditional branching in service middleware to different inner service types.

Variants

Trait Implementations

impl<A, B> Service for EitherService<A, B> where
    A: Service,
    B: Service<Request = A::Request, Response = A::Response, Error = A::Error>, 
[src]

Requests handled by the service.

Responses given by the service.

Errors produced by the service.

The future response value.

Returns Ready when the service is able to process requests. Read more

Process the request and return the response asynchronously. Read more

A future yielding the service when it is ready to accept a request.

Auto Trait Implementations

impl<A, B> Send for EitherService<A, B> where
    A: Send,
    B: Send

impl<A, B> Sync for EitherService<A, B> where
    A: Sync,
    B: Sync