std/sys/
mod.rs

1#![allow(unsafe_op_in_unsafe_fn)]
2
3/// The configure builtins provides runtime support compiler-builtin features
4/// which require dynamic initialization to work as expected, e.g. aarch64
5/// outline-atomics.
6mod configure_builtins;
7
8/// The PAL (platform abstraction layer) contains platform-specific abstractions
9/// for implementing the features in the other submodules, e.g. UNIX file
10/// descriptors.
11mod pal;
12
13mod alloc;
14mod personality;
15
16pub mod args;
17pub mod backtrace;
18pub mod cmath;
19pub mod env;
20pub mod env_consts;
21pub mod exit_guard;
22pub mod fd;
23pub mod fs;
24pub mod io;
25pub mod net;
26pub mod os_str;
27pub mod path;
28pub mod pipe;
29pub mod platform_version;
30pub mod process;
31pub mod random;
32pub mod stdio;
33pub mod sync;
34pub mod thread;
35pub mod thread_local;
36
37// FIXME(117276): remove this, move feature implementations into individual
38//                submodules.
39pub use pal::*;
40
41/// A trait for viewing representations from std types.
42#[cfg_attr(not(target_os = "linux"), allow(unused))]
43pub(crate) trait AsInner<Inner: ?Sized> {
44    fn as_inner(&self) -> &Inner;
45}
46
47/// A trait for viewing representations from std types.
48#[cfg_attr(not(target_os = "linux"), allow(unused))]
49pub(crate) trait AsInnerMut<Inner: ?Sized> {
50    fn as_inner_mut(&mut self) -> &mut Inner;
51}
52
53/// A trait for extracting representations from std types.
54pub(crate) trait IntoInner<Inner> {
55    fn into_inner(self) -> Inner;
56}
57
58/// A trait for creating std types from internal representations.
59pub(crate) trait FromInner<Inner> {
60    fn from_inner(inner: Inner) -> Self;
61}