summaryrefslogtreecommitdiffstats
path: root/tokio/src/io/util/mod.rs
blob: c945be0d1b304664e497ba9a0142abe2b1d4aeba (plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#![allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411

cfg_io_util! {
    mod async_buf_read_ext;
    pub use async_buf_read_ext::AsyncBufReadExt;

    mod async_read_ext;
    pub use async_read_ext::AsyncReadExt;

    mod async_seek_ext;
    pub use async_seek_ext::AsyncSeekExt;

    mod async_write_ext;
    pub use async_write_ext::AsyncWriteExt;

    mod buf_reader;
    pub use buf_reader::BufReader;

    mod buf_stream;
    pub use buf_stream::BufStream;

    mod buf_writer;
    pub use buf_writer::BufWriter;

    mod chain;

    mod copy;
    pub use copy::copy;

    mod copy_buf;
    pub use copy_buf::copy_buf;

    mod empty;
    pub use empty::{empty, Empty};

    mod flush;

    mod lines;
    pub use lines::Lines;

    mod mem;
    pub use mem::{duplex, DuplexStream};

    mod read;
    mod read_exact;
    mod read_int;
    mod read_line;

    mod read_to_end;
    cfg_process! {
        pub(crate) use read_to_end::read_to_end;
    }

    mod read_to_string;
    mod read_until;

    mod repeat;
    pub use repeat::{repeat, Repeat};

    mod shutdown;

    mod sink;
    pub use sink::{sink, Sink};

    mod split;
    pub use split::Split;

    mod take;
    pub use take::Take;

    mod write;
    mod write_all;
    mod write_int;


    // used by `BufReader` and `BufWriter`
    // https://github.com/rust-lang/rust/blob/master/src/libstd/sys_common/io.rs#L1
    const DEFAULT_BUF_SIZE: usize = 8 * 1024;
}

cfg_not_io_util! {
    cfg_process! {
        mod read_to_end;
        // Used by process
        pub(crate) use read_to_end::read_to_end;
    }
}