[−][src]Struct openapi_context::drop_context::DropContextMakeService
Middleware wrapper service that drops the context from the incoming request
and passes the plain hyper::Request
to the wrapped service.
This service can be used to to include services that take a plain hyper::Request
in a CompositeService
wrapped in an AddContextService
.
Example Usage
In the following example SwaggerService
implements hyper::service::MakeService
with Request = (hyper::Request, SomeContext)
, and PlainService
implements it
with Request = hyper::Request
ⓘThis example is not tested
let swagger_service_one = SwaggerService::new(); let swagger_service_two = SwaggerService::new(); let plain_service = PlainService::new(); let mut composite_new_service = CompositeMakeService::new(); composite_new_service.push(("/base/path/1", swagger_service_one)); composite_new_service.push(("/base/path/2", swagger_service_two)); composite_new_service.push(("/base/path/3", DropContextMakeService::new(plain_service)));
Methods
impl<C> DropContextMakeService<C>
[src]
Trait Implementations
impl<C: Debug> Debug for DropContextMakeService<C>
[src]
impl<T, C> Service<T> for DropContextMakeService<C>
[src]
type Response = DropContextService<T, C>
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = Ready<Result<Self::Response, Self::Error>>
The future response value.
fn poll_ready(&mut self, _cx: &mut Context) -> Poll<Result<(), Self::Error>>
[src]
fn call(&mut self, inner: T) -> Self::Future
[src]
Auto Trait Implementations
impl<C> RefUnwindSafe for DropContextMakeService<C> where
C: RefUnwindSafe,
C: RefUnwindSafe,
impl<C> Send for DropContextMakeService<C> where
C: Send,
C: Send,
impl<C> Sync for DropContextMakeService<C> where
C: Sync,
C: Sync,
impl<C> Unpin for DropContextMakeService<C> where
C: Unpin,
C: Unpin,
impl<C> UnwindSafe for DropContextMakeService<C> where
C: UnwindSafe,
C: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,