Expand description
A retry strategy that works with rusts native std::error::Error type.
TODO: Could make the impl of RetryableError trait into a proc-macro to auto-derive Retryable
on annotated enum variants.
ⓘ
#[derive(Debug, Error)]
enum ErrorFoo {
#[error("I am retryable")]
#[retryable]
Retryable,
#[error("Nested errors are retryable")]
#[retryable(inherit)]
NestedRetryable(AnotherErrorWithRetryableVariants),
#[error("Always fail")]
NotRetryable
}Structs§
- Exponential
Backoff - Exponential
Backoff Builder - NotSpecialized
- Retry
- Options to specify how to retry a function
- Retry
Builder - Builder for
Retry
Traits§
- Retryable
Error - Specifies which errors are retryable. All Errors are not retryable by-default.
- Strategy
- The strategy interface
Functions§
- arc_
retryable_ to_ error - Convert an
Arc<[RetryableError]>to a Standard LibraryArc<Error>