Struct ntp_proto::PollInterval
source · pub struct PollInterval(_);Expand description
Stores when we will next exchange packages with a remote server.
Implementations§
source§impl PollInterval
impl PollInterval
pub fn inc(self, limits: PollIntervalLimits) -> Self
pub fn dec(self, limits: PollIntervalLimits) -> Self
pub const fn as_log(self) -> i8
pub const fn as_duration(self) -> NtpDuration
pub const fn as_system_duration(self) -> Duration
Trait Implementations§
source§impl Clone for PollInterval
impl Clone for PollInterval
source§fn clone(&self) -> PollInterval
fn clone(&self) -> PollInterval
Returns a copy 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 PollInterval
impl Debug for PollInterval
source§impl Default for PollInterval
impl Default for PollInterval
source§impl<'de> Deserialize<'de> for PollInterval
impl<'de> Deserialize<'de> for PollInterval
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
source§impl Ord for PollInterval
impl Ord for PollInterval
source§fn cmp(&self, other: &PollInterval) -> Ordering
fn cmp(&self, other: &PollInterval) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<PollInterval> for PollInterval
impl PartialEq<PollInterval> for PollInterval
source§fn eq(&self, other: &PollInterval) -> bool
fn eq(&self, other: &PollInterval) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<PollInterval> for PollInterval
impl PartialOrd<PollInterval> for PollInterval
source§fn partial_cmp(&self, other: &PollInterval) -> Option<Ordering>
fn partial_cmp(&self, other: &PollInterval) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more