pub enum RetryPolicy<E = String> {
Retry(Option<Error>),
Fail(E),
}Expand description
Return type of inner future inside RetryFuture
Fail variant means unrecoverable error
If future propagates errors early by using ? then
Retry will contain error inside it.
If you want to provide some debug information about
why a Future failed, you can construct error youself.
Variants§
Retry(Option<Error>)
Fail(E)
Unrecoverable error which means that the RetryFuture
Future will immediately return with an error
Trait Implementations§
Source§impl<E: Debug> Debug for RetryPolicy<E>
impl<E: Debug> Debug for RetryPolicy<E>
Auto Trait Implementations§
impl<E> Freeze for RetryPolicy<E>where
E: Freeze,
impl<E> RefUnwindSafe for RetryPolicy<E>where
E: RefUnwindSafe,
impl<E> Send for RetryPolicy<E>where
E: Send,
impl<E> Sync for RetryPolicy<E>where
E: Sync,
impl<E> Unpin for RetryPolicy<E>where
E: Unpin,
impl<E> UnwindSafe for RetryPolicy<E>where
E: 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