diff --git a/src/io/mod.rs b/src/io/mod.rs index fd41587..5152b03 100644 --- a/src/io/mod.rs +++ b/src/io/mod.rs @@ -20,6 +20,8 @@ //! # Ok(()) }) } //! ``` +pub mod prelude; + #[doc(inline)] pub use std::io::{Error, ErrorKind, Result, SeekFrom}; diff --git a/src/io/prelude.rs b/src/io/prelude.rs new file mode 100644 index 0000000..e7303a9 --- /dev/null +++ b/src/io/prelude.rs @@ -0,0 +1,11 @@ +//! The I/O Prelude +//! +//! The purpose of this module is to alleviate imports of many common I/O traits +//! by adding a glob import to the top of I/O heavy modules: +//! +//! ``` +//! # #![allow(unused_imports)] +//! use async_std::io::prelude::*; +//! ``` + +pub use super::{BufRead, Read, Seek, Write};