Skip to main content

NtpClient

Trait NtpClient 

Source
pub trait NtpClient {
    // Required methods
    fn default_ntp(&self) -> Result<Maybe<&str, AsNullable>, Error>;
    fn supports_dns_resolve(&self) -> Result<bool, Error>;
    fn set_default_ntp(
        &self,
        request: &SetDefaultNTPRequest<'_>,
    ) -> Result<(), Error>;
}
Expand description

Data provider for the NTP_CLIENT feature.

Required Methods§

Source

fn default_ntp(&self) -> Result<Maybe<&str, AsNullable>, Error>

Hostname or IP address of the default NTP server, or Null if none is configured.

Source

fn supports_dns_resolve(&self) -> Result<bool, Error>

Whether the device’s NTP-client resolver supports DNS names (vs. only literal IP addresses).

Source

fn set_default_ntp( &self, request: &SetDefaultNTPRequest<'_>, ) -> Result<(), Error>

Handle SetDefaultNTP.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> NtpClient for &T
where T: NtpClient,

Implementors§