Enum exc_core::retry::RetryPolicy
source · [−]pub enum RetryPolicy<T, U, F> {
On {
f: F,
times: usize,
},
Never(PhantomData<fn() -> (T, U)>),
}Expand description
Retry Policy.
Variants
On
On.
Never(PhantomData<fn() -> (T, U)>)
Never.
Implementations
Trait Implementations
sourceimpl<T, U, F: Clone> Clone for RetryPolicy<T, U, F>
impl<T, U, F: Clone> Clone for RetryPolicy<T, U, F>
sourceimpl<T, U, F> Default for RetryPolicy<T, U, F>
impl<T, U, F> Default for RetryPolicy<T, U, F>
sourceimpl<T, U, E, F> Policy<T, U, E> for RetryPolicy<T, U, F> where
T: 'static + Clone,
U: 'static,
F: Fn(&E) -> bool,
F: Send + 'static + Clone,
impl<T, U, E, F> Policy<T, U, E> for RetryPolicy<T, U, F> where
T: 'static + Clone,
U: 'static,
F: Fn(&E) -> bool,
F: Send + 'static + Clone,
type Future = Pin<Box<dyn Future<Output = RetryPolicy<T, U, F>> + Send + 'static, Global>>
type Future = Pin<Box<dyn Future<Output = RetryPolicy<T, U, F>> + Send + 'static, Global>>
The Future type returned by Policy::retry.
sourcefn retry(&self, _req: &T, result: Result<&U, &E>) -> Option<Self::Future>
fn retry(&self, _req: &T, result: Result<&U, &E>) -> Option<Self::Future>
Check the policy if a certain request should be retried. Read more
sourcefn clone_request(&self, req: &T) -> Option<T>
fn clone_request(&self, req: &T) -> Option<T>
Tries to clone a request before being passed to the inner service. Read more
impl<T, U, F: Copy> Copy for RetryPolicy<T, U, F>
Auto Trait Implementations
impl<T, U, F> RefUnwindSafe for RetryPolicy<T, U, F> where
F: RefUnwindSafe,
impl<T, U, F> Send for RetryPolicy<T, U, F> where
F: Send,
impl<T, U, F> Sync for RetryPolicy<T, U, F> where
F: Sync,
impl<T, U, F> Unpin for RetryPolicy<T, U, F> where
F: Unpin,
impl<T, U, F> UnwindSafe for RetryPolicy<T, U, F> where
F: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more