Struct Timeout
pub struct Timeout<T> { /* private fields */ }
Applies a timeout to requests.
Implementations
impl<T> Timeout<T>
const fn new(inner: T, timeout: Duration) -> SelfCreates a new
Timeoutfn get_ref(&self) -> &TGet a reference to the inner service
fn get_mut(&mut self) -> &mut TGet a mutable reference to the inner service
fn into_inner(self) -> TConsume
self, returning the inner service
Trait Implementations
impl<S, Request> Service<Request> for Timeout<S>
where
S: Service<Request>,
S::Error: Into<BoxError>,
type Response = <S as Service<Request>>::Response;type Error = Box<dyn Error + Sync + Send>;type Future = ResponseFuture<<S as Service<Request>>::Future>;fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>fn call(&mut self, request: Request) -> Self::Future
impl<T: Clone> Clone for Timeout<T>
fn clone(&self) -> Self
impl<T: Debug> Debug for Timeout<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result