pub struct RestartSettings { /* private fields */ }Expand description
Backoff settings for RestartSource, RestartFlow, and RestartSink.
The restart counter follows Akka’s maxRestartsWithin rule: once the reset
window elapses, both the restart count and exponential backoff position are
reset. The random factor adds up to random_factor * computed_backoff extra
delay.
Implementations§
Source§impl RestartSettings
impl RestartSettings
pub fn new( min_backoff: Duration, max_backoff: Duration, random_factor: f64, ) -> Self
pub fn min_backoff(&self) -> Duration
pub fn max_backoff(&self) -> Duration
pub fn random_factor(&self) -> f64
pub fn max_restarts(&self) -> usize
pub fn max_restarts_within(&self) -> Duration
pub fn with_min_backoff(self, value: Duration) -> Self
pub fn with_max_backoff(self, value: Duration) -> Self
pub fn with_random_factor(self, value: f64) -> Self
pub fn with_max_restarts(self, count: usize, within: Duration) -> Self
Trait Implementations§
Source§impl Clone for RestartSettings
impl Clone for RestartSettings
Source§fn clone(&self) -> RestartSettings
fn clone(&self) -> RestartSettings
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 moreAuto Trait Implementations§
impl Freeze for RestartSettings
impl RefUnwindSafe for RestartSettings
impl Send for RestartSettings
impl Sync for RestartSettings
impl Unpin for RestartSettings
impl UnsafeUnpin for RestartSettings
impl UnwindSafe for RestartSettings
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage