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
0: InetAddr
Unix(UnixAddr)
Tuple Fields
0: UnixAddr
Netlink(NetlinkAddr)
Tuple Fields
0: NetlinkAddr
Alg(AlgAddr)
Tuple Fields
0: AlgAddr
Link(LinkAddr)
Tuple Fields
0: LinkAddr
Datalink address (MAC)
Vsock(VsockAddr)
Tuple Fields
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