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
47
48
49
// Copyright (c) core2 contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT
//
// Forked from core2 v0.4.0 by Brendan Molloy.
// Stripped to io-only. Error trait polyfill removed (stable in core since Rust 1.81).
//! # core3
//!
//! The bare essentials of `std::io` for use in `no_std` environments.
//! Drop-in successor to [`core2`](https://crates.io/crates/core2).
//!
//! When the `std` feature is enabled (default), this crate re-exports
//! `std::io` directly with zero overhead. When running
//! without `std`, it provides its own implementations of the core I/O
//! traits and types.
//!
//! ## Usage
//!
//! ```rust
//! use core3::io::{Read, Write, Cursor};
//! ```
//!
//! ## Features
//!
//! - `std` (default) - re-exports `std::io`
//! - `alloc` - enables `Vec<u8>` impls and allocating `Read` methods
//!
//! ## Migrating from core2
//!
//! ```toml
//! # Before
//! core2 = { version = "0.4", default-features = false }
//! # After
//! core3 = { version = "0.1", default-features = false }
//! ```
//!
//! Then replace `core2::io` with `core3::io` in your source.
extern crate alloc;
pub use io;