Enum nix::sys::socket::SockAddr [−][src]
pub enum SockAddr {
Inet(InetAddr),
Unix(UnixAddr),
Netlink(NetlinkAddr),
Alg(AlgAddr),
Link(LinkAddr),
Vsock(VsockAddr),
}
Expand description
Represents a socket address
Variants
Inet(InetAddr)
Tuple Fields of Inet
0: InetAddr
Unix(UnixAddr)
Tuple Fields of Unix
0: UnixAddr
Netlink(NetlinkAddr)
Tuple Fields of Netlink
0: NetlinkAddr
Alg(AlgAddr)
Tuple Fields of Alg
0: AlgAddr
Link(LinkAddr)
Datalink address (MAC)
Tuple Fields of Link
0: LinkAddr
Vsock(VsockAddr)
Tuple Fields of Vsock
0: VsockAddr
Implementations
Conversion from nix’s SockAddr type to the underlying libc sockaddr type.
This is useful for interfacing with other libc functions that don’t yet have nix wrappers. Returns a reference to the underlying data type (as a sockaddr reference) along with the size of the actual data type. sockaddr is commonly used as a proxy for a superclass as C doesn’t support inheritance, so many functions that take a sockaddr * need to take the size of the underlying type as well and then internally cast it back.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for SockAddr
impl UnwindSafe for SockAddr
Blanket Implementations
Mutably borrows from an owned value. Read more