Struct retry_error::RetryError [−][src]
pub struct RetryError<E> { /* fields omitted */ }Expand description
An error type for use when we’re going to do something a few times, and they might all fail.
To use this error type, initialize a new RetryError before you
start trying to do whatever it is. Then, every time the operation
fails, use RetryError::push() to add a new error to the list
of errors. If the operation fails too many times, you can use
RetryError as an Error itself.
Implementations
Crate a new RetryError, with no failed attempts,
The provided doing argument is a short string that describes
what we were trying to do when we failed too many times. It
will be used to format the final error message; it should be a
phrase that can go after “while trying to”.
This RetryError should not be used as-is, since when no
Errors have been pushed into it, it doesn’t represent an
actual failure.
Add an error to this RetryError.
You should call this method when an attempt at the underlying operation has failed.
Return an iterator over all of the reasons that the attempt behind this RetryError has failed.
Trait Implementations
Extends a collection with the contents of an iterator. Read more
extend_one)Extends a collection with exactly one element.
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations
impl<E> RefUnwindSafe for RetryError<E> where
E: RefUnwindSafe,
impl<E> Send for RetryError<E> where
E: Send,
impl<E> Sync for RetryError<E> where
E: Sync,
impl<E> Unpin for RetryError<E> where
E: Unpin,
impl<E> UnwindSafe for RetryError<E> where
E: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more