@@ -193,18 +193,19 @@ mod backend;
193193
194194/// Export the `*Fd` types and traits that are used in rustix's public API.
195195///
196- /// Users can use this to avoid needing to import anything else to use the same
197- /// versions of these types and traits.
196+ /// This module exports the types and traits from [`std::os::fd`], or polyills
197+ /// on Rust < 1.66 or on Windows.
198+ ///
199+ /// On Windows, the polyfill consists of aliases of the socket types and
200+ /// traits, For example, [`OwnedSocket`] is aliased to `OwnedFd`, and so on,
201+ /// and there are blanket impls for `AsFd` etc. that map to `AsSocket` impls.
202+ /// These blanket impls suffice for using the traits, however not for
203+ /// implementing them, so this module also exports `AsSocket` and the other
204+ /// traits as-is so that users can implement them if needed.
205+ ///
206+ /// [`OwnedSocket`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedSocket.html
198207pub mod fd {
199- use super :: backend;
200-
201- // Re-export `AsSocket` etc. too, as users can't implement `AsFd` etc. on
202- // Windows due to them having blanket impls on Windows, so users must
203- // implement `AsSocket` etc.
204- #[ cfg( windows) ]
205- pub use backend:: fd:: { AsRawSocket , AsSocket , FromRawSocket , IntoRawSocket } ;
206-
207- pub use backend:: fd:: { AsFd , AsRawFd , BorrowedFd , FromRawFd , IntoRawFd , OwnedFd , RawFd } ;
208+ pub use super :: backend:: fd:: * ;
208209}
209210
210211// The public API modules.
0 commit comments