Enum async_dnssd::ScopedSocketAddr
source · pub enum ScopedSocketAddr {
V4 {
address: Ipv4Addr,
port: u16,
scope_id: u32,
},
V6 {
address: Ipv6Addr,
port: u16,
scope_id: u32,
},
}
Expand description
IP address with port and “scope id” (even for IPv4)
When converting to SocketAddr
the “scope id” is lost for IPv4; when converting to
SocketAddrV6
it uses to_ipv6_mapped()
for IPv4 addresses.
Variants§
Implementations§
Trait Implementations§
source§impl Clone for ScopedSocketAddr
impl Clone for ScopedSocketAddr
source§fn clone(&self) -> ScopedSocketAddr
fn clone(&self) -> ScopedSocketAddr
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 ScopedSocketAddr
impl Debug for ScopedSocketAddr
source§impl Display for ScopedSocketAddr
impl Display for ScopedSocketAddr
source§impl From<ScopedSocketAddr> for SocketAddr
impl From<ScopedSocketAddr> for SocketAddr
source§fn from(scoped_addr: ScopedSocketAddr) -> Self
fn from(scoped_addr: ScopedSocketAddr) -> Self
Converts to this type from the input type.
source§impl From<ScopedSocketAddr> for SocketAddrV6
impl From<ScopedSocketAddr> for SocketAddrV6
source§fn from(scoped_addr: ScopedSocketAddr) -> Self
fn from(scoped_addr: ScopedSocketAddr) -> Self
Converts to this type from the input type.
source§impl Hash for ScopedSocketAddr
impl Hash for ScopedSocketAddr
source§impl Ord for ScopedSocketAddr
impl Ord for ScopedSocketAddr
source§fn cmp(&self, other: &ScopedSocketAddr) -> Ordering
fn cmp(&self, other: &ScopedSocketAddr) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ScopedSocketAddr
impl PartialEq for ScopedSocketAddr
source§impl PartialOrd for ScopedSocketAddr
impl PartialOrd for ScopedSocketAddr
impl Eq for ScopedSocketAddr
impl StructuralPartialEq for ScopedSocketAddr
Auto Trait Implementations§
impl Freeze for ScopedSocketAddr
impl RefUnwindSafe for ScopedSocketAddr
impl Send for ScopedSocketAddr
impl Sync for ScopedSocketAddr
impl Unpin for ScopedSocketAddr
impl UnwindSafe for ScopedSocketAddr
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)