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