pub struct TimeoutService<T> {
pub timeout: Duration,
pub inner: T,
}Expand description
Service that adds timeout functionality to an inner service.
Fields§
§timeout: Duration§inner: TImplementations§
Source§impl<F> TimeoutService<F>
impl<F> TimeoutService<F>
pub fn layer<C>() -> impl FactoryLayer<C, F, Factory = Self>
Trait Implementations§
Source§impl<F: AsyncMakeService> AsyncMakeService for TimeoutService<F>
impl<F: AsyncMakeService> AsyncMakeService for TimeoutService<F>
Source§type Service = TimeoutService<<F as AsyncMakeService>::Service>
type Service = TimeoutService<<F as AsyncMakeService>::Service>
The type of service this factory creates.
Source§type Error = <F as AsyncMakeService>::Error
type Error = <F as AsyncMakeService>::Error
The type of error that can occur during service creation.
Source§impl<T: Clone> Clone for TimeoutService<T>
impl<T: Clone> Clone for TimeoutService<T>
Source§fn clone(&self) -> TimeoutService<T>
fn clone(&self) -> TimeoutService<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<F: MakeService> MakeService for TimeoutService<F>
impl<F: MakeService> MakeService for TimeoutService<F>
Source§type Service = TimeoutService<<F as MakeService>::Service>
type Service = TimeoutService<<F as MakeService>::Service>
The type of service this factory creates.
Source§type Error = <F as MakeService>::Error
type Error = <F as MakeService>::Error
The type of error that can occur during service creation.
Auto Trait Implementations§
impl<T> Freeze for TimeoutService<T>where
T: Freeze,
impl<T> RefUnwindSafe for TimeoutService<T>where
T: RefUnwindSafe,
impl<T> Send for TimeoutService<T>where
T: Send,
impl<T> Sync for TimeoutService<T>where
T: Sync,
impl<T> Unpin for TimeoutService<T>where
T: Unpin,
impl<T> UnwindSafe for TimeoutService<T>where
T: 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