pub struct RetryStats {
pub total_retries: u64,
pub successful_retries: u64,
pub failed_retries: u64,
pub max_retries_exceeded: u64,
}Expand description
Retry statistics
Fields§
§total_retries: u64Total number of retries attempted
successful_retries: u64Number of successful retries
failed_retries: u64Number of failed retries
max_retries_exceeded: u64Number of messages that exceeded max retries
Implementations§
Source§impl RetryStats
impl RetryStats
Sourcepub fn record_success(&mut self)
pub fn record_success(&mut self)
Record a successful retry
Sourcepub fn record_failure(&mut self)
pub fn record_failure(&mut self)
Record a failed retry
Sourcepub fn record_max_exceeded(&mut self)
pub fn record_max_exceeded(&mut self)
Record a message that exceeded max retries
Sourcepub fn success_rate(&self) -> f64
pub fn success_rate(&self) -> f64
Get the success rate as a percentage
Trait Implementations§
Source§impl Clone for RetryStats
impl Clone for RetryStats
Source§fn clone(&self) -> RetryStats
fn clone(&self) -> RetryStats
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RetryStats
impl Debug for RetryStats
Source§impl Default for RetryStats
impl Default for RetryStats
Source§fn default() -> RetryStats
fn default() -> RetryStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RetryStats
impl RefUnwindSafe for RetryStats
impl Send for RetryStats
impl Sync for RetryStats
impl Unpin for RetryStats
impl UnwindSafe for RetryStats
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