pub struct TimeoutService<S, St> { /* private fields */ }Expand description
Applies a timeout to requests.
Implementations§
Source§impl<S, St> TimeoutService<S, St>
impl<S, St> TimeoutService<S, St>
Trait Implementations§
Source§impl<S: Clone, St: Clone> Clone for TimeoutService<S, St>
impl<S: Clone, St: Clone> Clone for TimeoutService<S, St>
Source§fn clone(&self) -> TimeoutService<S, St>
fn clone(&self) -> TimeoutService<S, St>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S, St, Req> Service<St, Req> for TimeoutService<S, St>where
S: Service<St, Req>,
impl<S, St, Req> Service<St, Req> for TimeoutService<S, St>where
S: Service<St, Req>,
Source§type Error = TimeoutError<<S as Service<St, Req>>::Error>
type Error = TimeoutError<<S as Service<St, Req>>::Error>
Errors produced by the service while checking readiness or executing a call.
Source§async fn call(
&self,
req: Req,
ctx: Ctx<'_, Self, St>,
) -> Result<S::Res, Self::Error>
async fn call( &self, req: Req, ctx: Ctx<'_, Self, St>, ) -> Result<S::Res, Self::Error>
Processes a request and asynchronously returns the response. Read more
Source§async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::Error>
async fn ready(&self, ctx: Ctx<'_, Self, St>) -> Result<(), Self::Error>
Returns when the service is ready to process requests. Read more
Source§fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
fn map<F, Res>(self, f: F) -> ServiceChain<Map<F, Self, Res>, St, Req>
Maps this service’s output to a different type, returning a new service. Read more
Source§fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
fn map_err<F, E>(self, f: F) -> ServiceChain<MapErr<F, Self, E>, St, Req>
Maps this service’s error to a different type, returning a new service. Read more
Auto Trait Implementations§
impl<S, St> Freeze for TimeoutService<S, St>
impl<S, St> RefUnwindSafe for TimeoutService<S, St>
impl<S, St> Send for TimeoutService<S, St>
impl<S, St> Sync for TimeoutService<S, St>
impl<S, St> Unpin for TimeoutService<S, St>
impl<S, St> UnsafeUnpin for TimeoutService<S, St>
impl<S, St> UnwindSafe for TimeoutService<S, St>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S, St, Req> IntoService<S, St, Req> for Swhere
S: Service<St, Req>,
impl<S, St, Req> IntoService<S, St, Req> for Swhere
S: Service<St, Req>,
Source§fn into_service(self) -> S
fn into_service(self) -> S
Convert to a
Service