pub enum NtpServerAddr {
HostPort {
hostname: String,
port: Option<u16>,
},
Traceable,
}Expand description
NTP server address: hostport or “/traceable/”.
Variants§
Implementations§
Source§impl NtpServerAddr
impl NtpServerAddr
Sourcepub fn from_hostname(hostname: impl ToString) -> NtpServerAddr
pub fn from_hostname(hostname: impl ToString) -> NtpServerAddr
Constructs an NtpServerAddr from the specified hostname.
Sourcepub fn from_hostname_with_port(
hostname: impl ToString,
port: u16,
) -> NtpServerAddr
pub fn from_hostname_with_port( hostname: impl ToString, port: u16, ) -> NtpServerAddr
Constructs an NtpServerAddr from the specified hostname and port.
Sourcepub fn new_traceable() -> NtpServerAddr
pub fn new_traceable() -> NtpServerAddr
Constructs a traceable NtpServerAddr.
Sourcepub fn builder(hostname: impl ToString) -> NtpServerAddr
pub fn builder(hostname: impl ToString) -> NtpServerAddr
Constructs a crate::builders::NtpServerAddr from the specified hostname.
Trait Implementations§
Source§impl Clone for NtpServerAddr
impl Clone for NtpServerAddr
Source§fn clone(&self) -> NtpServerAddr
fn clone(&self) -> NtpServerAddr
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 NtpServerAddr
impl Debug for NtpServerAddr
Source§impl Display for NtpServerAddr
impl Display for NtpServerAddr
impl Eq for NtpServerAddr
Source§impl From<NtpServerAddr> for ReferenceClock
impl From<NtpServerAddr> for ReferenceClock
Source§fn from(server: NtpServerAddr) -> Self
fn from(server: NtpServerAddr) -> Self
Converts to this type from the input type.
Source§impl From<NtpServerAddr> for Ntp
impl From<NtpServerAddr> for Ntp
Source§fn from(server: NtpServerAddr) -> Self
fn from(server: NtpServerAddr) -> Self
Converts to this type from the input type.
Source§impl FromStr for NtpServerAddr
impl FromStr for NtpServerAddr
Source§impl PartialEq for NtpServerAddr
impl PartialEq for NtpServerAddr
impl StructuralPartialEq for NtpServerAddr
Auto Trait Implementations§
impl Freeze for NtpServerAddr
impl RefUnwindSafe for NtpServerAddr
impl Send for NtpServerAddr
impl Sync for NtpServerAddr
impl Unpin for NtpServerAddr
impl UnsafeUnpin for NtpServerAddr
impl UnwindSafe for NtpServerAddr
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