1 //! The following is derived from Rust's 2 //! library/std/src/os/fd/mod.rs at revision 3 //! fa68e73e9947be8ffc5b3b46d899e4953a44e7e9. 4 //! 5 //! All code in this file is licensed MIT or Apache 2.0 at your option. 6 //! 7 //! Owned and borrowed Unix-like file descriptors. 8 //! 9 //! This module is supported on Unix platforms and WASI, which both use a 10 //! similar file descriptor system for referencing OS resources. 11 12 #![cfg_attr(staged_api, stable(feature = "os_fd", since = "1.66.0"))] 13 #![deny(unsafe_op_in_unsafe_fn)] 14 15 // `RawFd`, `AsRawFd`, etc. 16 mod raw; 17 18 // `OwnedFd`, `AsFd`, etc. 19 mod owned; 20 21 // Export the types and traits for the public API. 22 #[cfg_attr(staged_api, stable(feature = "os_fd", since = "1.66.0"))] 23 pub use owned::*; 24 #[cfg_attr(staged_api, stable(feature = "os_fd", since = "1.66.0"))] 25 pub use raw::*; 26