pub enum Strategy {
NoInterval(NoIntervalStrategy),
FixedInterval(FixedIntervalStrategy),
CustomIntervalStrategy(CustomIntervalStrategy),
}Expand description
Concrete retry strategy implementations. Choose NoInterval, FixedInterval, or CustomIntervalStrategy.
Variants§
NoInterval(NoIntervalStrategy)
Retry immediately with no delay between attempts.
FixedInterval(FixedIntervalStrategy)
Retry with a fixed delay between attempts.
CustomIntervalStrategy(CustomIntervalStrategy)
Retry with custom-defined delays for each attempt.
Trait Implementations§
Source§impl RetryStrategy for Strategy
impl RetryStrategy for Strategy
Source§fn max_retries(&self) -> usize
fn max_retries(&self) -> usize
Returns the maximum number of restart attempts before the actor is permanently stopped.
Source§fn next_backoff(&mut self) -> Option<Duration>
fn next_backoff(&mut self) -> Option<Duration>
Returns the delay before the next restart attempt, or
None to retry immediately.Auto Trait Implementations§
impl Freeze for Strategy
impl RefUnwindSafe for Strategy
impl Send for Strategy
impl Sync for Strategy
impl Unpin for Strategy
impl UnsafeUnpin for Strategy
impl UnwindSafe for Strategy
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