Struct Config
pub struct Config {
ntp_peers: Vec<String>,
ntp_interval: Duration,
ntp_retry_interval: Duration,
}Fields§
§ntp_peers: Vec<String>§ntp_interval: Duration§ntp_retry_interval: DurationImplementations§
§impl Config
impl Config
pub async fn load(paths: Vec<PathBuf>) -> Self
fn load_blocking(path: &Path) -> Result<Option<Self>>
pub const fn ntp_interval(&self) -> Duration
pub const fn ntp_interval(&self) -> Duration
Returns the interval at which to synchronize the time.
pub fn build_ntp_interval(&self) -> Interval
pub fn build_ntp_interval(&self) -> Interval
Builds a new interval for time synchronization.
pub const fn ntp_retry_interval(&self) -> Duration
pub const fn ntp_retry_interval(&self) -> Duration
Returns the interval at which to retry NTP synchronization after a failure.
Trait Implementations§
§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
§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
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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