Enum service_async::either::Either
source · pub enum Either<A, B> {
Left(A),
Right(B),
}
Variants§
Implementations§
source§impl<A, B> Either<A, B>
impl<A, B> Either<A, B>
source§impl<T> Either<T, T>
impl<T> Either<T, T>
pub fn into_inner(self) -> T
Trait Implementations§
source§impl<A: Error, B: Error> Error for Either<A, B>
impl<A: Error, B: Error> Error for Either<A, B>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl<C, F, FLA, FLB> FactoryLayer<C, F> for Either<FLA, FLB>where
FLA: FactoryLayer<C, F>,
FLB: FactoryLayer<C, F>,
impl<C, F, FLA, FLB> FactoryLayer<C, F> for Either<FLA, FLB>where
FLA: FactoryLayer<C, F>,
FLB: FactoryLayer<C, F>,
source§impl<A, B> MakeService for Either<A, B>where
A: MakeService,
B: MakeService,
impl<A, B> MakeService for Either<A, B>where
A: MakeService,
B: MakeService,
type Service = Either<<A as MakeService>::Service, <B as MakeService>::Service>
type Error = Either<<A as MakeService>::Error, <B as MakeService>::Error>
fn make_via_ref( &self, old: Option<&Self::Service> ) -> Result<Self::Service, Self::Error>
fn make(&self) -> Result<Self::Service, Self::Error>
Auto Trait Implementations§
impl<A, B> RefUnwindSafe for Either<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Either<A, B>
impl<A, B> Sync for Either<A, B>
impl<A, B> Unpin for Either<A, B>
impl<A, B> UnwindSafe for Either<A, B>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, Request, Response, E> BoxService<Request, Response, E> for Twhere
T: Service<Request, Response = Response, Error = E> + 'static,
Request: 'static,
impl<T, Request, Response, E> BoxService<Request, Response, E> for Twhere
T: Service<Request, Response = Response, Error = E> + 'static,
Request: 'static,
fn into_boxed(self) -> BoxedService<Request, Response, E>
source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more