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