pub struct Error<E> {
pub error: E,
pub total_delay: Duration,
pub tries: u64,
}
Expand description
An error with a retryable operation.
Fields§
§error: E
The error returned by the operation on the last try.
total_delay: Duration
The duration spent waiting between retries of the operation.
Note that this does not include the time spent running the operation itself.
tries: u64
The total number of times the operation was tried.
Trait Implementations§
Source§impl<E> Error for Error<E>where
E: StdError,
impl<E> Error for Error<E>where
E: StdError,
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn StdError>
fn cause(&self) -> Option<&dyn StdError>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
impl<E: Eq> Eq for Error<E>
impl<E> StructuralPartialEq for Error<E>
Auto Trait Implementations§
impl<E> Freeze for Error<E>where
E: Freeze,
impl<E> RefUnwindSafe for Error<E>where
E: RefUnwindSafe,
impl<E> Send for Error<E>where
E: Send,
impl<E> Sync for Error<E>where
E: Sync,
impl<E> Unpin for Error<E>where
E: Unpin,
impl<E> UnwindSafe for Error<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