pub trait SocketIpAddrExt<A: IpAddress>: Witness<A> + ScopeableAddress {
// Provided methods
fn must_have_zone(&self) -> bool
where Self: Copy { ... }
fn try_into_null_zoned(self) -> Option<AddrAndZone<Self, ()>> { ... }
}
Expand description
Extensions to IP Address witnesses useful in the context of sockets.
Provided Methods§
Sourcefn must_have_zone(&self) -> boolwhere
Self: Copy,
fn must_have_zone(&self) -> boolwhere
Self: Copy,
Determines whether the provided address is underspecified by itself.
Some addresses are ambiguous and so must have a zone identifier in order to be used in a socket address. This function returns true for IPv6 link-local addresses and false for all others.
Sourcefn try_into_null_zoned(self) -> Option<AddrAndZone<Self, ()>>
fn try_into_null_zoned(self) -> Option<AddrAndZone<Self, ()>>
Converts into a [AddrAndZone<A, ()>
] if the address requires a zone.
Otherwise returns None
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.