Struct Timeout

struct Timeout<T> { ... }

Applies a timeout to requests.

Implementations

impl<T> Timeout<T>

const fn new(inner: T, timeout: Duration) -> Self

Creates a new Timeout

fn get_ref(self: &Self) -> &T

Get a reference to the inner service

fn get_mut(self: &mut Self) -> &mut T

Get a mutable reference to the inner service

fn into_inner(self: Self) -> T

Consume self, returning the inner service

impl<M, S, Target, Request> MakeService for Timeout<T>

fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <M as MakeService<Target, Request>>::MakeError>>
fn make_service(self: &mut Self, target: Target) -> <M as MakeService<Target, Request>>::Future

impl<S, Request> Service for Timeout<S>

fn poll_ready(self: &mut Self, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>
fn call(self: &mut Self, request: Request) -> <Self as >::Future

impl<T> Any for Timeout<T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Timeout<T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Timeout<T>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Timeout<T>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> Freeze for Timeout<T>

impl<T> From for Timeout<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for Timeout<T>

impl<T> RefUnwindSafe for Timeout<T>

impl<T> Send for Timeout<T>

impl<T> Sync for Timeout<T>

impl<T> ToOwned for Timeout<T>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> Unpin for Timeout<T>

impl<T> UnwindSafe for Timeout<T>

impl<T> WithSubscriber for Timeout<T>

impl<T, Request> ServiceExt for Timeout<T>

impl<T, U> Into for Timeout<T>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Timeout<T>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Timeout<T>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<T: $crate::clone::Clone> Clone for Timeout<T>

fn clone(self: &Self) -> Timeout<T>

impl<T: $crate::fmt::Debug> Debug for Timeout<T>

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result