| 1 | //! Owned and borrowed Unix-like file descriptors. |
| 2 | //! |
| 3 | //! This module is supported on Unix platforms and WASI, which both use a |
| 4 | //! similar file descriptor system for referencing OS resources. |
| 5 | |
| 6 | #![stable (feature = "os_fd" , since = "1.66.0" )] |
| 7 | #![deny (unsafe_op_in_unsafe_fn)] |
| 8 | |
| 9 | // `RawFd`, `AsRawFd`, etc. |
| 10 | mod raw; |
| 11 | |
| 12 | // `OwnedFd`, `AsFd`, etc. |
| 13 | mod owned; |
| 14 | |
| 15 | // Implementations for `AsRawFd` etc. for network types. |
| 16 | #[cfg (not(target_os = "trusty" ))] |
| 17 | mod net; |
| 18 | |
| 19 | #[cfg (test)] |
| 20 | mod tests; |
| 21 | |
| 22 | // Export the types and traits for the public API. |
| 23 | #[stable (feature = "os_fd" , since = "1.66.0" )] |
| 24 | pub use owned::*; |
| 25 | #[stable (feature = "os_fd" , since = "1.66.0" )] |
| 26 | pub use raw::*; |
| 27 | |