devela/sys/io/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// devela::sys::io
//
//! I/O functionality.
//!
#![doc = crate::doc_!(extends: io)]
//!
//! # Derived work
#![doc = include_str!("./define_no_std_io/MODIFICATIONS.md")]
//
// safety
#![cfg_attr(feature = "safe_io", forbid(unsafe_code))]

#[cfg(any(feature = "std", all(not(feature = "std"), feature = "io")))]
#[cfg_attr(
    feature = "nightly_doc",
    doc(cfg(any(feature = "std", all(not(feature = "std"), feature = "io"))))
)]
mod impls;

#[cfg(all(not(feature = "std"), feature = "io"))]
#[cfg_attr(feature = "nightly_doc", doc(cfg(feature = "io")))]
mod define_no_std_io;
#[cfg(feature = "std")]
mod reexport_std;

crate::items! { // structural access: _mods, _all, _always
    #[allow(unused)]
    pub use _mods::*;
    #[allow(unused)] #[doc(hidden)] #[doc(no_inline)]
    pub use _always::*;

    mod _mods {
        #[cfg(all(not(feature = "std"), feature = "io"))]
        pub use super::define_no_std_io::*;
        #[cfg(feature = "std")]
        pub use super::reexport_std::*;
    }
    pub(super) mod _all { #![allow(unused)]
        #[doc(inline)]
        pub use super::_mods::*;
    }
    pub(super) mod _always { #![allow(unused)]
        #[cfg(feature = "std")]
        pub use super::reexport_std::*;
    }
}