pub struct TimeoutService<S> { /* private fields */ }
Expand description
Applies a timeout to requests.
Implementations§
Trait Implementations§
source§impl<S: Clone> Clone for TimeoutService<S>
impl<S: Clone> Clone for TimeoutService<S>
source§fn clone(&self) -> TimeoutService<S>
fn clone(&self) -> TimeoutService<S>
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<S: Debug> Debug for TimeoutService<S>
impl<S: Debug> Debug for TimeoutService<S>
source§impl<S, R> Service<R> for TimeoutService<S>where
S: Service<R>,
impl<S, R> Service<R> for TimeoutService<S>where
S: Service<R>,
source§type Error = TimeoutError<<S as Service<R>>::Error>
type Error = TimeoutError<<S as Service<R>>::Error>
Errors produced by the service when polling readiness or executing call.
source§async fn call(
&self,
request: R,
ctx: ServiceCtx<'_, Self>,
) -> Result<Self::Response, Self::Error>
async fn call( &self, request: R, ctx: ServiceCtx<'_, Self>, ) -> Result<Self::Response, Self::Error>
Process the request and return the response asynchronously. Read more
source§async fn ready(&self, ctx: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
async fn ready(&self, ctx: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
Returns when the service is able to process requests. Read more
Auto Trait Implementations§
impl<S> Freeze for TimeoutService<S>where
S: Freeze,
impl<S> RefUnwindSafe for TimeoutService<S>where
S: RefUnwindSafe,
impl<S> Send for TimeoutService<S>where
S: Send,
impl<S> Sync for TimeoutService<S>where
S: Sync,
impl<S> Unpin for TimeoutService<S>where
S: Unpin,
impl<S> UnwindSafe for TimeoutService<S>where
S: 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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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
Service