2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-01-31 09:45:36 +00:00
async-std/src/prelude.rs

54 lines
1.2 KiB
Rust
Raw Normal View History

2019-08-08 12:44:48 +00:00
//! The async prelude.
//!
//! 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
cfg_std! {
#[doc(no_inline)]
pub use std::future::Future;
#[doc(no_inline)]
pub use crate::stream::Stream;
2019-11-05 23:21:32 +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
#[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 _;
}
2020-03-03 23:30:45 +00:00
cfg_default! {
#[doc(no_inline)]
pub use crate::task_local;
}
cfg_unstable! {
#[doc(no_inline)]
pub use crate::stream::DoubleEndedStream;
#[doc(no_inline)]
pub use crate::stream::ExactSizeStream;
}