2019-08-08 12:44:48 +00:00
|
|
|
//! The async prelude.
|
|
|
|
//!
|
2019-09-11 14:13:17 +00:00
|
|
|
//! The prelude re-exports most commonly used traits and macros from this crate.
|
|
|
|
//!
|
|
|
|
//! # Examples
|
|
|
|
//!
|
|
|
|
//! Import the prelude with:
|
|
|
|
//!
|
|
|
|
//! ```
|
|
|
|
//! # #[allow(unused_imports)]
|
|
|
|
//! use async_std::prelude::*;
|
|
|
|
//! ```
|
2019-08-08 12:44:48 +00:00
|
|
|
|
2019-11-07 23:56:58 +00:00
|
|
|
cfg_std! {
|
|
|
|
#[doc(no_inline)]
|
2019-11-09 10:22:09 +00:00
|
|
|
pub use std::future::Future;
|
2019-11-07 23:56:58 +00:00
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::stream::Stream;
|
2019-11-05 23:21:32 +00:00
|
|
|
|
2019-11-07 23:56:58 +00:00
|
|
|
#[doc(inline)]
|
|
|
|
pub use crate::future::future::FutureExt;
|
|
|
|
#[doc(inline)]
|
|
|
|
pub use crate::stream::stream::StreamExt;
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::io::BufRead as _;
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::io::Read as _;
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::io::Seek as _;
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::io::Write as _;
|
2019-11-05 23:21:32 +00:00
|
|
|
|
2019-11-07 23:56:58 +00:00
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::io::prelude::BufReadExt as _;
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::io::prelude::ReadExt as _;
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::io::prelude::SeekExt as _;
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::io::prelude::WriteExt as _;
|
2019-10-15 07:51:53 +00:00
|
|
|
}
|
2020-03-03 23:30:45 +00:00
|
|
|
|
|
|
|
cfg_default! {
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::task_local;
|
|
|
|
}
|
2020-03-12 09:34:09 +00:00
|
|
|
|
|
|
|
cfg_unstable! {
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::stream::DoubleEndedStream;
|
|
|
|
#[doc(no_inline)]
|
|
|
|
pub use crate::stream::ExactSizeStream;
|
|
|
|
}
|