Skip to main content

std/sys/io/
mod.rs

1#![forbid(unsafe_op_in_unsafe_fn)]
2
3mod error;
4
5mod is_terminal {
6    cfg_select! {
7        any(target_family = "unix", target_os = "wasi") => {
8            mod isatty;
9            pub use isatty::*;
10        }
11        target_os = "windows" => {
12            mod windows;
13            pub use windows::*;
14        }
15        target_os = "hermit" => {
16            mod hermit;
17            pub use hermit::*;
18        }
19        target_os = "motor" => {
20            mod motor;
21            pub use motor::*;
22        }
23        _ => {
24            mod unsupported;
25            pub use unsupported::*;
26        }
27    }
28}
29
30mod kernel_copy;
31
32#[allow(unused_imports, reason = "only used by certain target configurations")]
33pub use alloc_crate::io::DEFAULT_BUF_SIZE;
34#[cfg_attr(not(target_os = "linux"), allow(unused_imports))]
35#[cfg(all(
36    target_family = "unix",
37    not(any(target_os = "dragonfly", target_os = "vxworks", target_os = "rtems"))
38))]
39pub use error::errno_location;
40#[cfg(any(
41    all(
42        target_family = "unix",
43        not(any(
44            target_os = "espidf",
45            target_os = "lynxos178",
46            target_os = "qurt",
47            target_os = "rtems",
48            target_os = "vxworks",
49        ))
50    ),
51    target_os = "wasi",
52))]
53pub use error::set_errno;
54pub use error::{decode_error_kind, errno, format_error, is_interrupted};
55pub use is_terminal::is_terminal;