Struct ntex_util::services::variant::VariantService2
source · pub struct VariantService2<V1, V2, V1R, V2R> { /* private fields */ }Trait Implementations§
source§impl<V1, V2, V1R, V2R> Service<Variant2<V1R, V2R>> for VariantService2<V1, V2, V1R, V2R>where
V1: Service<V1R>,
V2: Service<V2R, Response = V1::Response, Error = V1::Error>,
impl<V1, V2, V1R, V2R> Service<Variant2<V1R, V2R>> for VariantService2<V1, V2, V1R, V2R>where V1: Service<V1R>, V2: Service<V2R, Response = V1::Response, Error = V1::Error>,
§type Error = <V1 as Service<V1R>>::Error
type Error = <V1 as Service<V1R>>::Error
Errors produced by the service when polling readiness or executing call.
§type Future<'f> = ServiceResponse<ServiceCall<'f, V1, V1R>, ServiceCall<'f, V2, V2R>>
where
Self: 'f,
V1: 'f
type Future<'f> = ServiceResponse<ServiceCall<'f, V1, V1R>, ServiceCall<'f, V2, V2R>> where Self: 'f, V1: 'f
The future response value.
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready when the service is able to process requests. Read moresource§fn call<'a>(
&'a self,
req: Variant2<V1R, V2R>,
ctx: ServiceCtx<'a, Self>
) -> Self::Future<'a>
fn call<'a>( &'a self, req: Variant2<V1R, V2R>, ctx: ServiceCtx<'a, Self> ) -> Self::Future<'a>
Process the request and return the response asynchronously. Read more
source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where
Self: Sized,
F: Fn(Self::Response) -> Res,
fn map<F, Res>(self, f: F) -> ServiceChain<Map<Self, F, Req, Res>, Req>where Self: Sized, F: Fn(Self::Response) -> Res,
Map this service’s output to a different type, returning a new service of the resulting type. Read more
source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where
Self: Sized,
F: Fn(Self::Error) -> E,
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<Self, F, E>, Req>where Self: Sized, F: Fn(Self::Error) -> E,
Map this service’s error to a different error, returning a new service. Read more
source§fn chain(self) -> ServiceChain<Self, Req>where
Self: Sized,
fn chain(self) -> ServiceChain<Self, Req>where Self: Sized,
Convert
Self to a ServiceChainAuto Trait Implementations§
impl<V1, V2, V1R, V2R> RefUnwindSafe for VariantService2<V1, V2, V1R, V2R>where V1: RefUnwindSafe, V1R: RefUnwindSafe, V2: RefUnwindSafe, V2R: RefUnwindSafe,
impl<V1, V2, V1R, V2R> Send for VariantService2<V1, V2, V1R, V2R>where V1: Send, V1R: Send, V2: Send, V2R: Send,
impl<V1, V2, V1R, V2R> Sync for VariantService2<V1, V2, V1R, V2R>where V1: Sync, V1R: Sync, V2: Sync, V2R: Sync,
impl<V1, V2, V1R, V2R> Unpin for VariantService2<V1, V2, V1R, V2R>where V1: Unpin, V1R: Unpin, V2: Unpin, V2R: Unpin,
impl<V1, V2, V1R, V2R> UnwindSafe for VariantService2<V1, V2, V1R, V2R>where V1: UnwindSafe, V1R: UnwindSafe, V2: UnwindSafe, V2R: 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<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere Svc: Service<Req>,
source§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
Servicesource§fn into_chain(self) -> ServiceChain<Svc, Req>where
Self: Sized,
fn into_chain(self) -> ServiceChain<Svc, Req>where Self: Sized,
Convert
Self to a ServiceChain