pub struct Retry<P> { /* private fields */ }Expand description
Middleware that retries service calls according to a Policy.
The policy is cloned for each request.
Implementations§
Trait Implementations§
Source§impl<P, S, St> Middleware<S, St> for Retry<P>where
P: Clone,
impl<P, S, St> Middleware<S, St> for Retry<P>where
P: Clone,
Source§type Service = RetryService<P, S>
type Service = RetryService<P, S>
Service created by this middleware.
Source§fn create(&self, _: &St, service: S) -> <Retry<P> as Middleware<S, St>>::Service
fn create(&self, _: &St, service: S) -> <Retry<P> as Middleware<S, St>>::Service
Creates and returns a new middleware service.
Source§fn apply_to<Sf, Req>(
self,
factory: Sf,
) -> ServiceChainFactory<ApplyMiddleware<Self, Sf>, St, Req>
fn apply_to<Sf, Req>( self, factory: Sf, ) -> ServiceChainFactory<ApplyMiddleware<Self, Sf>, St, Req>
Creates a service factory that instantiates a service and applies
the current middleware to it. Read more
Auto Trait Implementations§
impl<P> Freeze for Retry<P>where
P: Freeze,
impl<P> RefUnwindSafe for Retry<P>where
P: RefUnwindSafe,
impl<P> Send for Retry<P>where
P: Send,
impl<P> Sync for Retry<P>where
P: Sync,
impl<P> Unpin for Retry<P>where
P: Unpin,
impl<P> UnsafeUnpin for Retry<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for Retry<P>where
P: 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