pub struct AckWindowLiveness { /* private fields */ }Expand description
Per-peer latched reachability with ack-window + hysteresis.
Implementations§
Source§impl AckWindowLiveness
impl AckWindowLiveness
Sourcepub fn update(
&mut self,
now: u64,
self_id: NodeId,
voters: &[NodeId],
last_ack: &BTreeMap<NodeId, u64>,
window: u64,
hysteresis: u64,
)
pub fn update( &mut self, now: u64, self_id: NodeId, voters: &[NodeId], last_ack: &BTreeMap<NodeId, u64>, window: u64, hysteresis: u64, )
Recompute latched reachability for every voter except self_id.
Sourcepub fn is_reachable(&self, peer: NodeId) -> bool
pub fn is_reachable(&self, peer: NodeId) -> bool
Whether peer is currently considered reachable (defaults to true).
Trait Implementations§
Source§impl Clone for AckWindowLiveness
impl Clone for AckWindowLiveness
Source§fn clone(&self) -> AckWindowLiveness
fn clone(&self) -> AckWindowLiveness
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 moreSource§impl Debug for AckWindowLiveness
impl Debug for AckWindowLiveness
Source§impl Default for AckWindowLiveness
impl Default for AckWindowLiveness
Source§fn default() -> AckWindowLiveness
fn default() -> AckWindowLiveness
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AckWindowLiveness
impl RefUnwindSafe for AckWindowLiveness
impl Send for AckWindowLiveness
impl Sync for AckWindowLiveness
impl Unpin for AckWindowLiveness
impl UnsafeUnpin for AckWindowLiveness
impl UnwindSafe for AckWindowLiveness
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