rust-lang/rust — pull request #19169 by aturon (2014-11-21 02:47:18+00:00)
Title: libs: add platform-specific APIs to extract file descriptors, SOCKETs, HANDLEs, etc from `std::io`

This PR adds some internal infrastructure to allow the private `std::sys` module to access internal representation details of `std::io`.

It then exposes those details in two new, platform-specific API surfaces: `std::os::unix` and `std::os::windows`.

To start with, these will provide the ability to extract file descriptors, HANDLEs, SOCKETs, and so on from `std::io` types.

More functionality, and more specific platforms (e.g. `std::os::linux`) will be added over time.

Closes #18897