Struct trust_dns_proto::multicast::MDNS_IPV6
source · [−]pub struct MDNS_IPV6 { /* private fields */ }
This is supported on crate feature
mdns
only.Expand description
link-local mDNS ipv6 address https://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xhtml
Methods from Deref<Target = SocketAddr>
1.7.0 · sourcepub fn ip(&self) -> IpAddr
pub fn ip(&self) -> IpAddr
Returns the IP address associated with this socket address.
Examples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
assert_eq!(socket.ip(), IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)));
1.0.0 · sourcepub fn port(&self) -> u16
pub fn port(&self) -> u16
Returns the port number associated with this socket address.
Examples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
assert_eq!(socket.port(), 8080);
1.16.0 · sourcepub fn is_ipv4(&self) -> bool
pub fn is_ipv4(&self) -> bool
Returns true
if the IP address in this SocketAddr
is an
IPv4
address, and false
otherwise.
Examples
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), 8080);
assert_eq!(socket.is_ipv4(), true);
assert_eq!(socket.is_ipv6(), false);
1.16.0 · sourcepub fn is_ipv6(&self) -> bool
pub fn is_ipv6(&self) -> bool
Returns true
if the IP address in this SocketAddr
is an
IPv6
address, and false
otherwise.
Examples
use std::net::{IpAddr, Ipv6Addr, SocketAddr};
let socket = SocketAddr::new(IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 65535, 0, 1)), 8080);
assert_eq!(socket.is_ipv4(), false);
assert_eq!(socket.is_ipv6(), true);
Trait Implementations
sourceimpl Deref for MDNS_IPV6
impl Deref for MDNS_IPV6
type Target = SocketAddr
type Target = SocketAddr
The resulting type after dereferencing.
sourcefn deref(&self) -> &SocketAddr
fn deref(&self) -> &SocketAddr
Dereferences the value.
impl LazyStatic for MDNS_IPV6
Auto Trait Implementations
impl RefUnwindSafe for MDNS_IPV6
impl Send for MDNS_IPV6
impl Sync for MDNS_IPV6
impl Unpin for MDNS_IPV6
impl UnwindSafe for MDNS_IPV6
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
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>,
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