pub struct Reach(_);Expand description
Used to determine whether the server is reachable and the data are fresh
This value is represented as an 8-bit shift register. The register is shifted left by one bit when a packet is sent and the rightmost bit is set to zero. As valid packets arrive, the rightmost bit is set to one. If the register contains any nonzero bits, the server is considered reachable; otherwise, it is unreachable.
Implementations§
source§impl Reach
impl Reach
pub fn is_reachable(&self) -> bool
sourcepub fn unanswered_polls(&self) -> u32
pub fn unanswered_polls(&self) -> u32
Number of polls since the last message we received
sourcepub fn reachability_score(&self) -> u32
pub fn reachability_score(&self) -> u32
Number of polls remaining until unreachable
Trait Implementations§
source§impl<'de> Deserialize<'de> for Reach
impl<'de> Deserialize<'de> for Reach
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Reach
Auto Trait Implementations§
impl RefUnwindSafe for Reach
impl Send for Reach
impl Sync for Reach
impl Unpin for Reach
impl UnwindSafe for Reach
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