Struct salvo_core::tower_compat::TowerServiceHandler
source · pub struct TowerServiceHandler<Svc, QB>(/* private fields */);
Available on crate feature
tower-compat
only.Expand description
Tower service compat handler.
Trait Implementations§
source§impl<Svc, QB, SB, E, Fut> Handler for TowerServiceHandler<Svc, QB>where
QB: TryFrom<ReqBody> + Body + Send + Sync + 'static,
<QB as TryFrom<ReqBody>>::Error: StdError + Send + Sync + 'static,
SB: Body + Send + Sync + 'static,
SB::Data: Into<Bytes> + Send + Debug + 'static,
SB::Error: StdError + Send + Sync + 'static,
E: StdError + Send + Sync + 'static,
Svc: Service<Request<QB>, Response = Response<SB>, Future = Fut> + Send + Sync + Clone + 'static,
Svc::Error: StdError + Send + Sync + 'static,
Fut: Future<Output = Result<Response<SB>, E>> + Send + 'static,
impl<Svc, QB, SB, E, Fut> Handler for TowerServiceHandler<Svc, QB>where
QB: TryFrom<ReqBody> + Body + Send + Sync + 'static,
<QB as TryFrom<ReqBody>>::Error: StdError + Send + Sync + 'static,
SB: Body + Send + Sync + 'static,
SB::Data: Into<Bytes> + Send + Debug + 'static,
SB::Error: StdError + Send + Sync + 'static,
E: StdError + Send + Sync + 'static,
Svc: Service<Request<QB>, Response = Response<SB>, Future = Fut> + Send + Sync + Clone + 'static,
Svc::Error: StdError + Send + Sync + 'static,
Fut: Future<Output = Result<Response<SB>, E>> + Send + 'static,
source§fn handle<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
_depot: &'life2 mut Depot,
res: &'life3 mut Response,
_ctrl: &'life4 mut FlowCtrl
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn handle<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
req: &'life1 mut Request,
_depot: &'life2 mut Depot,
res: &'life3 mut Response,
_ctrl: &'life4 mut FlowCtrl
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Handle http request.
Auto Trait Implementations§
impl<Svc, QB> Freeze for TowerServiceHandler<Svc, QB>where
Svc: Freeze,
impl<Svc, QB> RefUnwindSafe for TowerServiceHandler<Svc, QB>where
Svc: RefUnwindSafe,
QB: RefUnwindSafe,
impl<Svc, QB> Send for TowerServiceHandler<Svc, QB>
impl<Svc, QB> Sync for TowerServiceHandler<Svc, QB>
impl<Svc, QB> Unpin for TowerServiceHandler<Svc, QB>
impl<Svc, QB> UnwindSafe for TowerServiceHandler<Svc, QB>where
Svc: UnwindSafe,
QB: UnwindSafe,
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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