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) -> SocketAddrAny
impl Debug for SocketAddrAny
fn fmt(&Self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result
impl Eq for SocketAddrAny
impl Hash for SocketAddrAny
fn hash<__H: $crate::hash::Hasher>(&Self, state: &mut __H) -> ()
impl Ord for SocketAddrAny
fn cmp(&Self, other: &SocketAddrAny) -> $crate::cmp::Ordering
impl PartialEq<SocketAddrAny> for SocketAddrAny
fn eq(&Self, other: &SocketAddrAny) -> bool
fn ne(&Self, other: &SocketAddrAny) -> bool
impl PartialOrd<SocketAddrAny> for SocketAddrAny
fn partial_cmp(&Self, other: &SocketAddrAny) -> $crate::option::Option<$crate::cmp::Ordering>
impl StructuralEq for SocketAddrAny
impl StructuralPartialEq for SocketAddrAny
Auto Trait Implementations
impl RefUnwindSafe for SocketAddrAny
impl Send for SocketAddrAny
impl Sync for SocketAddrAny
impl Unpin for SocketAddrAny
impl UnwindSafe for SocketAddrAny
Blanket Implementations
impl<T> BorrowMut<T> for T
where
T: ?Sized,
where
T: ?Sized,
fn borrow_mut(&mut Self) -> &mut T