Enum actix_net::either::Either [−][src]
pub enum Either<A, B> { A(A), B(B), }
Combine two different new service types into a single type.
Variants
A(A)
B(B)
Trait Implementations
impl<A, B> NewService for Either<A, B> where
A: NewService,
B: NewService<Request = A::Request, Response = A::Response, Error = A::Error, InitError = A::InitError>,
[src]
impl<A, B> NewService for Either<A, B> where
A: NewService,
B: NewService<Request = A::Request, Response = A::Response, Error = A::Error, InitError = A::InitError>,
type Request = A::Request
Requests handled by the service
type Response = A::Response
Responses given by the service
type Error = A::Error
Errors produced by the service
type InitError = A::InitError
Errors produced while building a service.
type Service = EitherService<A::Service, B::Service>
The Service
value created by this factory
type Future = EitherNewService<A, B>
The future of the Service
instance.
fn new_service(&self) -> Self::Future
[src]
fn new_service(&self) -> Self::Future
Create and return a new service value asynchronously.