Skip to main content

std/sys/
mod.rs

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