pub struct BackoffConfig {
pub initial_interval: Duration,
pub max_interval: Duration,
pub jitter_fraction: f64,
}Expand description
Static configuration for a backoff strategy.
Construct once and pass by reference; per-instance mutable state lives
in BackoffState.
Fields§
§initial_interval: DurationInitial retry interval.
max_interval: DurationMaximum retry interval (backoff ceiling).
jitter_fraction: f64Jitter fraction in [0.0, 1.0]. 0.25 means ±25 % of the current
interval is added as random noise.
Implementations§
Source§impl BackoffConfig
impl BackoffConfig
Sourcepub fn for_neighbor_hello() -> Self
pub fn for_neighbor_hello() -> Self
Backoff profile suitable for link-local neighbor discovery hellos.
Short initial interval for fast bootstrap; caps at 10 s to avoid stale neighbor entries persisting too long.
Sourcepub fn for_swim_probe() -> Self
pub fn for_swim_probe() -> Self
Backoff profile for SWIM indirect probing.
Shorter intervals to match SWIM’s failure-detection SLA.
Trait Implementations§
Source§impl Clone for BackoffConfig
impl Clone for BackoffConfig
Source§fn clone(&self) -> BackoffConfig
fn clone(&self) -> BackoffConfig
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 BackoffConfig
impl Debug for BackoffConfig
Auto Trait Implementations§
impl Freeze for BackoffConfig
impl RefUnwindSafe for BackoffConfig
impl Send for BackoffConfig
impl Sync for BackoffConfig
impl Unpin for BackoffConfig
impl UnwindSafe for BackoffConfig
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