Struct trust_dns_server::config::Config
source · [−]pub struct Config { /* private fields */ }
Expand description
Server configuration
Implementations
sourceimpl Config
impl Config
sourcepub fn read_config(path: &Path) -> ConfigResult<Config>
pub fn read_config(path: &Path) -> ConfigResult<Config>
read a Config file from the file specified at path.
sourcepub fn get_listen_addrs_ipv4(&self) -> Vec<Ipv4Addr>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn get_listen_addrs_ipv4(&self) -> Vec<Ipv4Addr>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
set of listening ipv4 addresses (for TCP and UDP)
sourcepub fn get_listen_addrs_ipv6(&self) -> Vec<Ipv6Addr>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn get_listen_addrs_ipv6(&self) -> Vec<Ipv6Addr>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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_tcp_request_timeout(&self) -> Duration
pub fn get_tcp_request_timeout(&self) -> Duration
default timeout for all TCP connections before forceably 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
sourceimpl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more