Enum rustix::net::SocketAddrAny
#[non_exhaustive]
pub enum SocketAddrAny {
V4(SocketAddrV4),
V6(SocketAddrV6),
Unix(SocketAddrUnix),
}Documentation
struct sockaddr_storage as a Rust enum.
Variants
Implementations
impl SocketAddrAny
pub const fn address_family(&Self) -> AddressFamily
Return the address family of this socket address.
pub unsafe fn write(&Self, storage: *mut SocketAddrStorage) -> usize
pub unsafe fn read(storage: *const SocketAddrStorage, len: usize) -> io::Result<Self>
Trait Implementations
impl Clone for SocketAddrAny
fn clone(&Self) -> SocketAddrAnyimpl Debug for SocketAddrAny
fn fmt(&Self, fmt: &mut fmt::Formatter<'_>) -> fmt::Resultimpl Eq for SocketAddrAnyimpl Hash for SocketAddrAny
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()impl Ord for SocketAddrAny
fn cmp(&Self, other: &SocketAddrAny) -> $crate::cmp::Orderingimpl PartialEq<SocketAddrAny> for SocketAddrAny
fn eq(&Self, other: &SocketAddrAny) -> boolfn ne(&Self, other: &SocketAddrAny) -> boolimpl PartialOrd<SocketAddrAny> for SocketAddrAny
fn partial_cmp(&Self, other: &SocketAddrAny) -> $crate::option::Option<$crate::cmp::Ordering>impl StructuralEq for SocketAddrAnyimpl StructuralPartialEq for SocketAddrAnyAuto Trait Implementations
impl RefUnwindSafe for SocketAddrAnyimpl Send for SocketAddrAnyimpl Sync for SocketAddrAnyimpl Unpin for SocketAddrAnyimpl UnwindSafe for SocketAddrAnyBlanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T