pub struct ConditionOption<T> { /* private fields */ }
Expand description
Trait Implementations§
Source§impl<T: Debug> Debug for ConditionOption<T>
impl<T: Debug> Debug for ConditionOption<T>
Source§impl<T> From<Option<T>> for ConditionOption<T>
impl<T> From<Option<T>> for ConditionOption<T>
Source§impl<S, T, Req, BE, BD, Err> Transform<S, Req> for ConditionOption<T>where
S: Service<Req, Response = ServiceResponse<BD>, Error = Err> + 'static,
T: Transform<S, Req, Response = ServiceResponse<BE>, Error = Err>,
T::Future: 'static,
T::InitError: 'static,
T::Transform: 'static,
impl<S, T, Req, BE, BD, Err> Transform<S, Req> for ConditionOption<T>where
S: Service<Req, Response = ServiceResponse<BD>, Error = Err> + 'static,
T: Transform<S, Req, Response = ServiceResponse<BE>, Error = Err>,
T::Future: 'static,
T::InitError: 'static,
T::Transform: 'static,
Source§type Response = ServiceResponse<EitherBody<BE, BD>>
type Response = ServiceResponse<EitherBody<BE, BD>>
Responses produced by the service.
Source§type Transform = ConditionMiddleware<<T as Transform<S, Req>>::Transform, S>
type Transform = ConditionMiddleware<<T as Transform<S, Req>>::Transform, S>
The
TransformService
value created by this factorySource§type InitError = <T as Transform<S, Req>>::InitError
type InitError = <T as Transform<S, Req>>::InitError
Errors produced while building a transform service.
Source§type Future = Pin<Box<dyn Future<Output = Result<<ConditionOption<T> as Transform<S, Req>>::Transform, <ConditionOption<T> as Transform<S, Req>>::InitError>>>>
type Future = Pin<Box<dyn Future<Output = Result<<ConditionOption<T> as Transform<S, Req>>::Transform, <ConditionOption<T> as Transform<S, Req>>::InitError>>>>
The future response value.
Source§fn new_transform(&self, service: S) -> Self::Future
fn new_transform(&self, service: S) -> Self::Future
Creates and returns a new Transform component, asynchronously
Auto Trait Implementations§
impl<T> Freeze for ConditionOption<T>where
T: Freeze,
impl<T> RefUnwindSafe for ConditionOption<T>where
T: RefUnwindSafe,
impl<T> Send for ConditionOption<T>where
T: Send,
impl<T> Sync for ConditionOption<T>where
T: Sync,
impl<T> Unpin for ConditionOption<T>where
T: Unpin,
impl<T> UnwindSafe for ConditionOption<T>where
T: 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more