Struct xitca_web::middleware::tower_http_compat::CompatLayer
source · pub struct CompatLayer<S>(/* private fields */);Trait Implementations§
source§impl<S, C, ReqB, ResB, Err> Service<Request<CompatReqBody<RequestExt<ReqB>, C>>> for CompatLayer<S>where
S: for<'r> Service<WebContext<'r, C, ReqB>, Response = WebResponse<ResB>, Error = Err> + 'static,
C: 'static,
ReqB: 'static,
impl<S, C, ReqB, ResB, Err> Service<Request<CompatReqBody<RequestExt<ReqB>, C>>> for CompatLayer<S>where
S: for<'r> Service<WebContext<'r, C, ReqB>, Response = WebResponse<ResB>, Error = Err> + 'static,
C: 'static,
ReqB: 'static,
§type Response = Response<CompatResBody<ResB>>
type Response = Response<CompatResBody<ResB>>
Responses given by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<CompatLayer<S> as Service<Request<CompatReqBody<RequestExt<ReqB>, C>>>>::Response, <CompatLayer<S> as Service<Request<CompatReqBody<RequestExt<ReqB>, C>>>>::Error>>>>
type Future = Pin<Box<dyn Future<Output = Result<<CompatLayer<S> as Service<Request<CompatReqBody<RequestExt<ReqB>, C>>>>::Response, <CompatLayer<S> as Service<Request<CompatReqBody<RequestExt<ReqB>, C>>>>::Error>>>>
The future response value.
source§fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&mut self, _: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Poll::Ready(Ok(())) when the service is able to process requests. Read moresource§fn call(
&mut self,
req: Request<CompatReqBody<RequestExt<ReqB>, C>>
) -> Self::Future
fn call( &mut self, req: Request<CompatReqBody<RequestExt<ReqB>, C>> ) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations§
impl<S> RefUnwindSafe for CompatLayer<S>where
S: RefUnwindSafe,
impl<S> !Send for CompatLayer<S>
impl<S> !Sync for CompatLayer<S>
impl<S> Unpin for CompatLayer<S>
impl<S> UnwindSafe for CompatLayer<S>where
S: RefUnwindSafe,
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