pub enum DnsConfig {
UseSrv {
host: String,
srv: String,
fallback_port: u16,
},
NoSrv {
host: String,
port: u16,
},
Addr {
addr: String,
},
}Expand description
XMPP server connection configuration
Variants§
UseSrv
Available on crate feature
dns only.Use SRV record to find server host
Fields
NoSrv
Available on crate feature
dns only.Manually define server host and port
Addr
Manually define IP: port (TODO: socket)
Implementations§
Source§impl DnsConfig
impl DnsConfig
Sourcepub fn srv(host: &str, srv: &str, fallback_port: u16) -> Self
Available on crate feature dns only.
pub fn srv(host: &str, srv: &str, fallback_port: u16) -> Self
dns only.Constructor for DnsConfig::UseSrv variant
Sourcepub fn srv_default_client(host: &str) -> Self
Available on crate feature dns only.
pub fn srv_default_client(host: &str) -> Self
dns only.Constructor for the default SRV resolution strategy for clients (StartTLS)
Sourcepub fn srv_xmpps(host: &str) -> Self
Available on crate feature dns only.
pub fn srv_xmpps(host: &str) -> Self
dns only.Constructor for direct TLS connections using RFC 7590 _xmpps-client._tcp
Trait Implementations§
Source§impl From<DnsConfig> for DirectTlsServerConnector
Available on crate feature direct-tls only.
impl From<DnsConfig> for DirectTlsServerConnector
Available on crate feature
direct-tls only.Source§fn from(dns_config: DnsConfig) -> DirectTlsServerConnector
fn from(dns_config: DnsConfig) -> DirectTlsServerConnector
Converts to this type from the input type.
Source§impl From<DnsConfig> for StartTlsServerConnector
Available on crate feature starttls only.
impl From<DnsConfig> for StartTlsServerConnector
Available on crate feature
starttls only.Source§fn from(dns_config: DnsConfig) -> StartTlsServerConnector
fn from(dns_config: DnsConfig) -> StartTlsServerConnector
Converts to this type from the input type.
Source§impl From<DnsConfig> for TcpServerConnector
Available on crate feature insecure-tcp only.
impl From<DnsConfig> for TcpServerConnector
Available on crate feature
insecure-tcp only.Source§fn from(dns_config: DnsConfig) -> TcpServerConnector
fn from(dns_config: DnsConfig) -> TcpServerConnector
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DnsConfig
impl RefUnwindSafe for DnsConfig
impl Send for DnsConfig
impl Sync for DnsConfig
impl Unpin for DnsConfig
impl UnwindSafe for DnsConfig
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more