Enum mhost::nameserver::NameServerConfig
source · pub enum NameServerConfig {
Udp {
protocol: Protocol,
ip_addr: IpAddr,
port: u16,
name: Option<String>,
},
Tcp {
protocol: Protocol,
ip_addr: IpAddr,
port: u16,
name: Option<String>,
},
Tls {
protocol: Protocol,
ip_addr: IpAddr,
port: u16,
tls_auth_name: String,
name: Option<String>,
},
Https {
protocol: Protocol,
ip_addr: IpAddr,
port: u16,
tls_auth_name: String,
name: Option<String>,
},
}
Variants§
Implementations§
source§impl NameServerConfig
impl NameServerConfig
pub async fn from_str_with_resolution( resolvers: &ResolverGroup, str: &str ) -> Result<NameServerConfig>
pub fn from_str(str: &str) -> Result<NameServerConfig>
source§impl NameServerConfig
impl NameServerConfig
pub fn udp<T: Into<SocketAddr>>(socket_addr: T) -> Self
pub fn udp_with_name<T: Into<SocketAddr>, S: Into<Option<String>>>( socket_addr: T, name: S ) -> Self
pub fn tcp<T: Into<SocketAddr>>(socket_addr: T) -> Self
pub fn tcp_with_name<T: Into<SocketAddr>, S: Into<Option<String>>>( socket_addr: T, name: S ) -> Self
pub fn tls<T: Into<SocketAddr>, S: Into<String>>( socket_addr: T, tls_auth_name: S ) -> Self
pub fn tls_with_name<T: Into<SocketAddr>, S: Into<String>, U: Into<Option<String>>>( socket_addr: T, tls_auth_name: S, name: U ) -> Self
pub fn https<T: Into<SocketAddr>, S: Into<String>>( socket_addr: T, tls_auth_name: S ) -> Self
pub fn https_with_name<T: Into<SocketAddr>, S: Into<String>, U: Into<Option<String>>>( socket_addr: T, tls_auth_name: S, name: U ) -> Self
pub fn protocol(&self) -> Protocol
Trait Implementations§
source§impl Clone for NameServerConfig
impl Clone for NameServerConfig
source§fn clone(&self) -> NameServerConfig
fn clone(&self) -> NameServerConfig
Returns a copy of the value. Read more
1.0.0 · 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 NameServerConfig
impl Debug for NameServerConfig
source§impl Display for NameServerConfig
impl Display for NameServerConfig
source§impl From<NameServerConfig> for ResolverConfig
impl From<NameServerConfig> for ResolverConfig
source§fn from(ns_config: NameServerConfig) -> Self
fn from(ns_config: NameServerConfig) -> Self
Converts to this type from the input type.
source§impl PartialEq for NameServerConfig
impl PartialEq for NameServerConfig
source§fn eq(&self, other: &NameServerConfig) -> bool
fn eq(&self, other: &NameServerConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for NameServerConfig
impl Serialize for NameServerConfig
impl Eq for NameServerConfig
impl StructuralPartialEq for NameServerConfig
Auto Trait Implementations§
impl RefUnwindSafe for NameServerConfig
impl Send for NameServerConfig
impl Sync for NameServerConfig
impl Unpin for NameServerConfig
impl UnwindSafe for NameServerConfig
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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.