Struct backoff_tower::BackoffService
source · pub struct BackoffService<P, S, B> { /* private fields */ }Expand description
A service for the retrying of a call with back offs.
This service adds the backoff wrapper to the request so that the inner service can choose an appropriate backoff period before reattempting its service call
Implementations§
source§impl<P, S, B> BackoffService<P, S, B>
impl<P, S, B> BackoffService<P, S, B>
pub fn new(policy: P, inner: S, backoff: B) -> Self
pub fn new_from_retry( retry: Retry<BackoffPolicy<P>, BackoffInnerService<S, B>> ) -> Self
Trait Implementations§
source§impl<P: Clone, S: Clone, B: Clone> Clone for BackoffService<P, S, B>
impl<P: Clone, S: Clone, B: Clone> Clone for BackoffService<P, S, B>
source§fn clone(&self) -> BackoffService<P, S, B>
fn clone(&self) -> BackoffService<P, S, B>
Returns a copy 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<P, S, B, Req> Service<Req> for BackoffService<P, S, B>where
P: Policy<Req, S::Response, S::Error> + Clone,
B: BackoffStrategy,
S: Service<Req> + Clone,
impl<P, S, B, Req> Service<Req> for BackoffService<P, S, B>where P: Policy<Req, S::Response, S::Error> + Clone, B: BackoffStrategy, S: Service<Req> + Clone,
Auto Trait Implementations§
impl<P, S, B> RefUnwindSafe for BackoffService<P, S, B>where B: RefUnwindSafe, P: RefUnwindSafe, S: RefUnwindSafe,
impl<P, S, B> Send for BackoffService<P, S, B>where B: Send, P: Send, S: Send,
impl<P, S, B> Sync for BackoffService<P, S, B>where B: Sync, P: Sync, S: Sync,
impl<P, S, B> Unpin for BackoffService<P, S, B>where P: Unpin,
impl<P, S, B> UnwindSafe for BackoffService<P, S, B>where B: UnwindSafe, P: UnwindSafe, S: 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