pub enum DnsTarget {
PreferHigher {
host: String,
port: u16,
},
Dns4 {
host: String,
port: u16,
},
Dns6 {
host: String,
port: u16,
},
}Variants§
PreferHigher
“PreferHigher” is encoded as dns, specifying that the highest IP stack available should be used
Dns4
Dns6
Implementations§
Source§impl DnsTarget
impl DnsTarget
pub fn includes_ipv6(&self) -> bool
pub fn includes_ipv4(&self) -> bool
Sourcepub fn host(&self) -> &str
pub fn host(&self) -> &str
Host string, without port if present
Not all DNS records have a constant, known port; See SRV records
Sourcepub fn port(&self) -> Option<u16>
pub fn port(&self) -> Option<u16>
Exposed port for the specified address
Not all DNS records have a constant, known port; See SRV records
Sourcepub fn contains(&self, addr: &SocketAddr, check_port: bool) -> bool
pub fn contains(&self, addr: &SocketAddr, check_port: bool) -> bool
Checks that a SocketAddr is valid in the range of the specified DNS class
Trait Implementations§
Source§impl From<DnsTarget> for TcpStreamTarget
impl From<DnsTarget> for TcpStreamTarget
impl Eq for DnsTarget
impl StructuralPartialEq for DnsTarget
Auto Trait Implementations§
impl Freeze for DnsTarget
impl RefUnwindSafe for DnsTarget
impl Send for DnsTarget
impl Sync for DnsTarget
impl Unpin for DnsTarget
impl UnwindSafe for DnsTarget
Blanket Implementations§
Source§impl<TTunnel, TAssignTunnelId> AssignTunnelId<Arc<TTunnel>> for TAssignTunnelIdwhere
TAssignTunnelId: AssignTunnelId<TTunnel>,
TTunnel: WithTunnelId,
impl<TTunnel, TAssignTunnelId> AssignTunnelId<Arc<TTunnel>> for TAssignTunnelIdwhere
TAssignTunnelId: AssignTunnelId<TTunnel>,
TTunnel: WithTunnelId,
fn assign_tunnel_id(self, tunnel_id: TunnelId) -> Arc<TTunnel>
Source§impl<TTunnel, TAssignTunnelId> AssignTunnelId<Box<TTunnel>> for TAssignTunnelIdwhere
TAssignTunnelId: AssignTunnelId<TTunnel>,
TTunnel: WithTunnelId,
impl<TTunnel, TAssignTunnelId> AssignTunnelId<Box<TTunnel>> for TAssignTunnelIdwhere
TAssignTunnelId: AssignTunnelId<TTunnel>,
TTunnel: WithTunnelId,
fn assign_tunnel_id(self, tunnel_id: TunnelId) -> Box<TTunnel>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.