pub struct TimeoutService<S> { /* private fields */ }Expand description
Applies a timeout to requests.
Implementations
sourceimpl<S> TimeoutService<S>
impl<S> TimeoutService<S>
Trait Implementations
sourceimpl<S: Clone> Clone for TimeoutService<S>
impl<S: Clone> Clone for TimeoutService<S>
sourcefn clone(&self) -> TimeoutService<S>
fn clone(&self) -> TimeoutService<S>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<S: Debug> Debug for TimeoutService<S>
impl<S: Debug> Debug for TimeoutService<S>
sourceimpl<S, R> Service<R> for TimeoutService<S> where
S: Service<R>,
impl<S, R> Service<R> for TimeoutService<S> where
S: Service<R>,
type Error = TimeoutError<S::Error>
type Error = TimeoutError<S::Error>
Errors produced by the service.
type Future = Either<TimeoutServiceResponse<S, R>, TimeoutServiceResponse2<S, R>>
type Future = Either<TimeoutServiceResponse<S, R>, TimeoutServiceResponse2<S, R>>
The future response value.
sourcefn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns Ready when the service is able to process requests. Read more
sourcefn poll_shutdown(&self, cx: &mut Context<'_>, is_error: bool) -> Poll<()>
fn poll_shutdown(&self, cx: &mut Context<'_>, is_error: bool) -> Poll<()>
Shutdown service. Read more
sourcefn call(&self, request: R) -> Self::Future
fn call(&self, request: R) -> Self::Future
Process the request and return the response asynchronously. Read more
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T, Req> IntoService<T, Req> for T where
T: Service<Req>,
impl<T, Req> IntoService<T, Req> for T where
T: Service<Req>,
sourcepub fn into_service(self) -> T
pub fn into_service(self) -> T
Convert to a Service
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more