| 1 | #![allow (unsafe_op_in_unsafe_fn)] |
| 2 | |
| 3 | mod alloc; |
| 4 | mod configure_builtins; |
| 5 | mod helpers; |
| 6 | mod pal; |
| 7 | mod personality; |
| 8 | |
| 9 | pub mod args; |
| 10 | pub mod backtrace; |
| 11 | pub mod cmath; |
| 12 | pub mod env; |
| 13 | pub mod env_consts; |
| 14 | pub mod exit_guard; |
| 15 | pub mod fd; |
| 16 | pub mod fs; |
| 17 | pub mod io; |
| 18 | pub mod net; |
| 19 | pub mod os_str; |
| 20 | pub mod path; |
| 21 | pub mod pipe; |
| 22 | pub mod platform_version; |
| 23 | pub mod process; |
| 24 | pub mod random; |
| 25 | pub mod stdio; |
| 26 | pub mod sync; |
| 27 | pub mod thread; |
| 28 | pub mod thread_local; |
| 29 | pub mod time; |
| 30 | |
| 31 | // FIXME(117276): remove this, move feature implementations into individual |
| 32 | // submodules. |
| 33 | pub use pal::*; |
| 34 | |
| 35 | /// A trait for viewing representations from std types. |
| 36 | #[cfg_attr (not(target_os = "linux" ), allow(unused))] |
| 37 | pub(crate) trait AsInner<Inner: ?Sized> { |
| 38 | fn as_inner(&self) -> &Inner; |
| 39 | } |
| 40 | |
| 41 | /// A trait for viewing representations from std types. |
| 42 | #[cfg_attr (not(target_os = "linux" ), allow(unused))] |
| 43 | pub(crate) trait AsInnerMut<Inner: ?Sized> { |
| 44 | fn as_inner_mut(&mut self) -> &mut Inner; |
| 45 | } |
| 46 | |
| 47 | /// A trait for extracting representations from std types. |
| 48 | pub(crate) trait IntoInner<Inner> { |
| 49 | fn into_inner(self) -> Inner; |
| 50 | } |
| 51 | |
| 52 | /// A trait for creating std types from internal representations. |
| 53 | pub(crate) trait FromInner<Inner> { |
| 54 | fn from_inner(inner: Inner) -> Self; |
| 55 | } |
| 56 | |