pub struct Config {
pub period: Duration,
pub initial_delay: Duration,
pub step: Duration,
pub min_delay: Duration,
pub max_delay: Duration,
pub quiet_rounds: u32,
}Expand description
How this detector beats, waits and adapts.
Fields§
§period: DurationHow often this process announces itself. Fixed; only the timeout adapts.
initial_delay: DurationThe silence a peer is allowed before it is suspected, to begin with. The book’s Δ.
step: DurationThe book’s Δ again, as the amount the delay moves by in either direction.
min_delay: DurationThe delay never falls below this.
max_delay: DurationThe delay never rises above this. See the module note on what the cap costs.
quiet_rounds: u32How many consecutive rounds with nothing suspected before the delay comes down. Up fast, down slow: this is the asymmetry that damps the oscillation. See the module note on why the condition is “nothing suspected” rather than “nothing withdrawn”.
Implementations§
Trait Implementations§
impl Copy for Config
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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