pub enum ConditionMiddleware<E, D> {
Enable(E),
Disable(D),
}
Variants§
Trait Implementations§
Source§impl<E, D, Req, BE, BD, Err> Service<Req> for ConditionMiddleware<E, D>where
E: Service<Req, Response = ServiceResponse<BE>, Error = Err>,
D: Service<Req, Response = ServiceResponse<BD>, Error = Err>,
impl<E, D, Req, BE, BD, Err> Service<Req> for ConditionMiddleware<E, D>where
E: Service<Req, Response = ServiceResponse<BE>, Error = Err>,
D: Service<Req, Response = ServiceResponse<BD>, Error = Err>,
Source§type Response = ServiceResponse<EitherBody<BE, BD>>
type Response = ServiceResponse<EitherBody<BE, BD>>
Responses given by the service.
Source§type Future = ConditionMiddlewareFuture<<E as Service<Req>>::Future, <D as Service<Req>>::Future>
type Future = ConditionMiddlewareFuture<<E as Service<Req>>::Future, <D as Service<Req>>::Future>
The future response value.
Auto Trait Implementations§
impl<E, D> Freeze for ConditionMiddleware<E, D>
impl<E, D> RefUnwindSafe for ConditionMiddleware<E, D>where
E: RefUnwindSafe,
D: RefUnwindSafe,
impl<E, D> Send for ConditionMiddleware<E, D>
impl<E, D> Sync for ConditionMiddleware<E, D>
impl<E, D> Unpin for ConditionMiddleware<E, D>
impl<E, D> UnwindSafe for ConditionMiddleware<E, D>where
E: UnwindSafe,
D: 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<S, Req> IntoService<S, Req> for Swhere
S: Service<Req>,
impl<S, Req> IntoService<S, Req> for Swhere
S: Service<Req>,
Source§fn into_service(self) -> S
fn into_service(self) -> S
Convert to a
Service
Source§impl<S, Req> ServiceExt<Req> for Swhere
S: Service<Req>,
impl<S, Req> ServiceExt<Req> for Swhere
S: Service<Req>,
Source§fn map<F, R>(self, f: F) -> Map<Self, F, Req, R>
fn map<F, R>(self, f: F) -> Map<Self, F, Req, R>
Map this service’s output to a different type, returning a new service
of the resulting type. Read more