1//! A tiny, `no_std`-friendly facade around `std::io`.
2//! Reexports types from `std` when available; otherwise reimplements and
3//! provides some of the core logic.
4//!
5//! The main reason that `std::io` hasn't found itself reexported as part of
6//! the `core` crate is the `std::io::{Read, Write}` traits' reliance on
7//! `std::io::Error`, which may contain internally a heap-allocated `Box<Error>`
8//! and/or now relying on OS-specific `std::backtrace::Backtrace`.
9
10pub use self::imp::{Error, ErrorKind, Result, Write};
11
12#[cfg(not(feature = "std"))]
13#[path = "core.rs"]
14mod imp;
15
16#[cfg(feature = "std")]
17use std::io as imp;
18
19#[cfg(feature = "std")]
20pub use std::io::{Bytes, Read};
21