logo
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
50
51
52
53
//! 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::*;
//! ```

cfg_std! {
    #[doc(no_inline)]
    pub use std::future::Future;
    #[doc(no_inline)]
    pub use crate::stream::Stream;

    #[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 _;

    #[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 _;
}

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;
}