Struct actix_utils::either::Either [−][src]
pub struct Either<A, B> { /* fields omitted */ }
Expand description
Combine two different new service types into a single service.
Implementations
Trait Implementations
impl<A, B> ServiceFactory for Either<A, B> where
A: ServiceFactory,
A::Config: Clone,
B: ServiceFactory<Config = A::Config, Response = A::Response, Error = A::Error, InitError = A::InitError>,
impl<A, B> ServiceFactory for Either<A, B> where
A: ServiceFactory,
A::Config: Clone,
B: ServiceFactory<Config = A::Config, Response = A::Response, Error = A::Error, InitError = A::InitError>,
type Service = EitherService<A::Service, B::Service>
type Service = EitherService<A::Service, B::Service>
The kind of Service
created by this factory.
type Future = EitherNewService<A, B>
type Future = EitherNewService<A, B>
The future of the Service
instance.
Create and return a new service asynchronously.
Map this service’s output to a different type, returning a new service of the resulting type. Read more
Map this service’s error to a different error, returning a new service.
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E> where
F: Fn(Self::InitError) -> E + Clone,
fn map_init_err<F, E>(self, f: F) -> MapInitErr<Self, F, E> where
F: Fn(Self::InitError) -> E + Clone,
Map this factory’s init error to a different error, returning a new service.
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
Convert Self
to a ServiceFactory