pub trait SocketAddrExt: Sized {
// Required methods
fn unspecified_v4() -> Self;
fn unspecified_v6() -> Self;
fn as_unspecified(&self) -> Self;
}Expand description
Extension trait for SocketAddr.
Required Methods§
Sourcefn unspecified_v4() -> Self
fn unspecified_v4() -> Self
Returns the unspecified IPv4 socket address, bound to port 0.
Sourcefn unspecified_v6() -> Self
fn unspecified_v6() -> Self
Returns the unspecified IPv6 socket address, bound to port 0.
Sourcefn as_unspecified(&self) -> Self
fn as_unspecified(&self) -> Self
Returns the unspecified socket address of the same family as other, bound to port 0.
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.