#[non_exhaustive]pub enum BackoffError {
InvalidFactor(f64),
FirstExceedsMax {
first: Duration,
max: Duration,
},
}Expand description
Error returned by BackoffPolicy::new when parameters violate the policy invariants.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidFactor(f64)
factor was not finite or was below 1.0 (a backoff factor must not shrink delays).
FirstExceedsMax
first exceeded max (the initial delay cannot be larger than the cap).
Trait Implementations§
Source§impl Clone for BackoffError
impl Clone for BackoffError
Source§fn clone(&self) -> BackoffError
fn clone(&self) -> BackoffError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BackoffError
Source§impl Debug for BackoffError
impl Debug for BackoffError
Source§impl Display for BackoffError
impl Display for BackoffError
Source§impl Error for BackoffError
impl Error for BackoffError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for BackoffError
impl PartialEq for BackoffError
impl StructuralPartialEq for BackoffError
Auto Trait Implementations§
impl Freeze for BackoffError
impl RefUnwindSafe for BackoffError
impl Send for BackoffError
impl Sync for BackoffError
impl Unpin for BackoffError
impl UnsafeUnpin for BackoffError
impl UnwindSafe for BackoffError
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