pub struct Timeout<S, F> { /* private fields */ }
Expand description
Applies a timeout to requests.
Implementations§
Source§impl<S, F> Timeout<S, F>
impl<S, F> Timeout<S, F>
Sourcepub fn into_inner(self) -> S
pub fn into_inner(self) -> S
Consumes self
, returning the underlying service.
Source§impl<S> Timeout<S, LayerErrorStatic<Elapsed>>
impl<S> Timeout<S, LayerErrorStatic<Elapsed>>
Source§impl<S, E> Timeout<S, LayerErrorStatic<E>>
impl<S, E> Timeout<S, LayerErrorStatic<E>>
Trait Implementations§
Source§impl<T, F, S, Request, E> Service<S, Request> for Timeout<T, F>
impl<T, F, S, Request, E> Service<S, Request> for Timeout<T, F>
Auto Trait Implementations§
impl<S, F> Freeze for Timeout<S, F>
impl<S, F> RefUnwindSafe for Timeout<S, F>where
S: RefUnwindSafe,
F: RefUnwindSafe,
impl<S, F> Send for Timeout<S, F>
impl<S, F> Sync for Timeout<S, F>
impl<S, F> Unpin for Timeout<S, F>
impl<S, F> UnwindSafe for Timeout<S, F>where
S: UnwindSafe,
F: 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§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<S, StateIn, StateOut, RequestIn, RequestOut> RequestInspector<StateIn, RequestIn> for S
impl<S, StateIn, StateOut, RequestIn, RequestOut> RequestInspector<StateIn, RequestIn> for S
Source§type Error = <S as Service<StateIn, RequestIn>>::Error
type Error = <S as Service<StateIn, RequestIn>>::Error
The type of error returned by the service.
type RequestOut = RequestOut
type StateOut = StateOut
Source§fn inspect_request(
&self,
ctx: Context<StateIn>,
req: RequestIn,
) -> impl Future<Output = Result<(Context<<S as RequestInspector<StateIn, RequestIn>>::StateOut>, <S as RequestInspector<StateIn, RequestIn>>::RequestOut), <S as RequestInspector<StateIn, RequestIn>>::Error>> + Send
fn inspect_request( &self, ctx: Context<StateIn>, req: RequestIn, ) -> impl Future<Output = Result<(Context<<S as RequestInspector<StateIn, RequestIn>>::StateOut>, <S as RequestInspector<StateIn, RequestIn>>::RequestOut), <S as RequestInspector<StateIn, RequestIn>>::Error>> + Send
Inspect the request, modify it if needed or desired, and return it.