[][src]Enum futures_retry::RetryPolicy

pub enum RetryPolicy<E> {
    Repeat,
    WaitRetry(Duration),
    ForwardError(E),
}

What to do when a future returns an error. Used in FutureRetry::new and StreamRetry::new.

Variants

Repeat

Create and poll a new future immediately.

Be careful!

Please be careful when using this variant since it might lead to a high (actually 100%) CPU usage in case a future instantly resolves into an error every time.

WaitRetry(Duration)

Wait for a given duration and make another attempt then.

ForwardError(E)

Don't give it another try, just pass the error further to the user.

Trait Implementations

impl<E: Debug> Debug for RetryPolicy<E>[src]

impl<E: Eq> Eq for RetryPolicy<E>[src]

impl<E: PartialEq> PartialEq<RetryPolicy<E>> for RetryPolicy<E>[src]

impl<E> StructuralEq for RetryPolicy<E>[src]

impl<E> StructuralPartialEq for RetryPolicy<E>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.