#[non_exhaustive]pub enum Event {
AttemptFailed {
attempt: u32,
},
AttemptTimedOut {
attempt: u32,
},
RetryScheduled {
attempt: u32,
delay: Duration,
},
Succeeded {
attempts: u32,
},
GaveUp {
attempts: u32,
},
CircuitStateChanged {
to: BreakerState,
},
ConcurrencyRejected,
RetryBudgetExhausted {
attempts: u32,
},
}Expand description
A lifecycle event emitted by the engine when a hook is registered.
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.
AttemptFailed
An attempt’s operation returned an error that will be classified.
AttemptTimedOut
An attempt exceeded attempt_timeout.
RetryScheduled
A retry was scheduled after delay.
Succeeded
The operation eventually succeeded.
GaveUp
Retries were exhausted (attempt cap, max_elapsed, or total timeout).
CircuitStateChanged
The circuit breaker changed state.
Fields
§
to: BreakerStateConcurrencyRejected
A call was rejected by the concurrency limit.
RetryBudgetExhausted
A retry was denied because the shared retry budget was exhausted.
Trait Implementations§
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
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