pub struct ServerConfig {Show 31 fields
pub hostname: String,
pub port: UdpPort,
pub minpoll: PollInterval,
pub maxpoll: PollInterval,
pub connectivity: SourceConnectivity,
pub auto_offline: bool,
pub presend: PollInterval,
pub burst: bool,
pub iburst: bool,
pub min_stratum: Stratum,
pub poll_target: PollTarget,
pub version: Option<NtpVersion>,
pub min_samples: Option<u32>,
pub max_samples: Option<u32>,
pub filter: Option<u32>,
pub interleaved: bool,
pub select_opts: SelectOptions,
pub nts: bool,
pub nts_port: UdpPort,
pub copy: bool,
pub ext_fields: u32,
pub authkey: u32,
pub cert_set: u32,
pub max_delay: f64,
pub max_delay_ratio: f64,
pub max_delay_dev_ratio: f64,
pub max_delay_quant: f64,
pub min_delay: f64,
pub asymmetry: f64,
pub offset: f64,
pub family: AddressFamily,
}Expand description
Configuration for an NTP server source (or peer).
This is the largest configuration struct in the crate, with ~30 fields covering all
chrony options for the server and peer directives: polling intervals, selection
options, authentication, NTS, delay constraints, and address family preferences.
Default values mirror chrony’s built-in defaults.
§Examples
use chrony_confile::ast::ServerConfig;
let config = ServerConfig {
hostname: "ntp.example.com".to_string(),
iburst: true,
..Default::default()
};
assert!(config.iburst);
assert_eq!(config.minpoll.get(), 6);Fields§
§hostname: String§port: UdpPort§minpoll: PollInterval§maxpoll: PollInterval§connectivity: SourceConnectivity§auto_offline: bool§presend: PollInterval§burst: bool§iburst: bool§min_stratum: Stratum§poll_target: PollTarget§version: Option<NtpVersion>§min_samples: Option<u32>§max_samples: Option<u32>§filter: Option<u32>§interleaved: bool§select_opts: SelectOptions§nts: bool§nts_port: UdpPort§copy: bool§ext_fields: u32§authkey: u32§cert_set: u32§max_delay: f64§max_delay_ratio: f64§max_delay_dev_ratio: f64§max_delay_quant: f64§min_delay: f64§asymmetry: f64§offset: f64§family: AddressFamilyImplementations§
Source§impl ServerConfig
impl ServerConfig
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
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 ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§impl PartialEq for ServerConfig
impl PartialEq for ServerConfig
Source§fn eq(&self, other: &ServerConfig) -> bool
fn eq(&self, other: &ServerConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ServerConfig
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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