Struct tokio_retry::middleware::Middleware
source · [−]pub struct Middleware<T, S> { /* private fields */ }
Expand description
Middleware that adds retries to a service via a retry strategy.
Implementations
sourceimpl<T: StrategyFactory, S> Middleware<T, S>
impl<T: StrategyFactory, S> Middleware<T, S>
pub fn new(handle: Handle, strategy: T, inner: S) -> Middleware<T, S>
Trait Implementations
sourceimpl<T: StrategyFactory, S: Service> Service for Middleware<T, S> where
S::Request: Clone,
impl<T: StrategyFactory, S: Service> Service for Middleware<T, S> where
S::Request: Clone,
type Future = Retry<T::Iter, ServiceRequest<S>>
type Future = Retry<T::Iter, ServiceRequest<S>>
The future response value.
Auto Trait Implementations
impl<T, S> !RefUnwindSafe for Middleware<T, S>
impl<T, S> !Send for Middleware<T, S>
impl<T, S> !Sync for Middleware<T, S>
impl<T, S> Unpin for Middleware<T, S> where
T: Unpin,
impl<T, S> !UnwindSafe for Middleware<T, S>
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