diff options
author | Alan Somers <asomers@gmail.com> | 2021-12-21 06:10:50 -0700 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2022-03-21 20:50:24 -0600 |
commit | 76d70b4b25ef499c8bb0a322590eb86e3370b548 (patch) | |
tree | ba00a102ac5cad3a0d773270ef55f2c121748ba3 /src/lib.rs | |
parent | b2ff9d227fd2693283fadfb908a8b7eb91e567b5 (diff) | |
download | nix-76d70b4b25ef499c8bb0a322590eb86e3370b548.zip |
Replace the Sockaddr enum with a union
The SockAddr enum is quite large, and the user must allocate space for
the whole thing even though he usually knows what type he needs.
Furthermore, thanks to the sa_family field, the sockaddr types are
basically an enum even in C.
So replace the ungainly enum with a SockaddrLike trait implemented by
all sockaddr types and a SockaddrStorage union that has safe accessors.
Also, deprecate InetAddr, which only existed to support SockAddr.
Supplants #1504
Fixes #1544
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -31,6 +31,7 @@ //! * `reboot` - Reboot the system //! * `resource` - Process resource limits //! * `sched` - Manipulate process's scheduling +//! * `socket` - Sockets, whether for networking or local use //! * `signal` - Send and receive signals to processes //! * `term` - Terminal control APIs //! * `time` - Query the operating system's clocks |