Struct trust_dns_server::config::Config
source · pub struct Config { /* private fields */ }
Expand description
Server configuration
Implementations§
source§impl Config
impl Config
sourcepub fn read_config(path: &Path) -> ConfigResult<Self>
pub fn read_config(path: &Path) -> ConfigResult<Self>
read a Config file from the file specified at path.
sourcepub fn get_listen_addrs_ipv4(&self) -> Result<Vec<Ipv4Addr>, AddrParseError>
pub fn get_listen_addrs_ipv4(&self) -> Result<Vec<Ipv4Addr>, AddrParseError>
set of listening ipv4 addresses (for TCP and UDP)
sourcepub fn get_listen_addrs_ipv6(&self) -> Result<Vec<Ipv6Addr>, AddrParseError>
pub fn get_listen_addrs_ipv6(&self) -> Result<Vec<Ipv6Addr>, AddrParseError>
set of listening ipv6 addresses (for TCP and UDP)
sourcepub fn get_listen_port(&self) -> u16
pub fn get_listen_port(&self) -> u16
port on which to listen for connections on specified addresses
sourcepub fn get_tls_listen_port(&self) -> u16
pub fn get_tls_listen_port(&self) -> u16
port on which to listen for TLS connections
sourcepub fn get_https_listen_port(&self) -> u16
pub fn get_https_listen_port(&self) -> u16
port on which to listen for HTTPS connections
sourcepub fn get_quic_listen_port(&self) -> u16
pub fn get_quic_listen_port(&self) -> u16
port on which to listen for QUIC connections
sourcepub fn get_tcp_request_timeout(&self) -> Duration
pub fn get_tcp_request_timeout(&self) -> Duration
default timeout for all TCP connections before forcibly shutdown
sourcepub fn get_log_level(&self) -> Level
pub fn get_log_level(&self) -> Level
specify the log level which should be used, [“Trace”, “Debug”, “Info”, “Warn”, “Error”]
sourcepub fn get_directory(&self) -> &Path
pub fn get_directory(&self) -> &Path
the path for all zone configurations, defaults to /var/named
sourcepub fn get_zones(&self) -> &[ZoneConfig]
pub fn get_zones(&self) -> &[ZoneConfig]
the set of zones which should be loaded
sourcepub fn get_tls_cert(&self) -> Option<&TlsCertConfig>
pub fn get_tls_cert(&self) -> Option<&TlsCertConfig>
the tls certificate to use for accepting tls connections
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
Auto Trait Implementations§
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