1 | #![allow (clippy::needless_doctest_main)] |
2 | #![warn ( |
3 | missing_debug_implementations, |
4 | missing_docs, |
5 | rust_2018_idioms, |
6 | unreachable_pub |
7 | )] |
8 | #![doc (test( |
9 | no_crate_inject, |
10 | attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables)) |
11 | ))] |
12 | #![cfg_attr (docsrs, feature(doc_cfg))] |
13 | |
14 | //! Utilities for working with Tokio. |
15 | //! |
16 | //! This crate is not versioned in lockstep with the core |
17 | //! [`tokio`] crate. However, `tokio-util` _will_ respect Rust's |
18 | //! semantic versioning policy, especially with regard to breaking changes. |
19 | //! |
20 | //! [`tokio`]: https://docs.rs/tokio |
21 | |
22 | #[macro_use ] |
23 | mod cfg; |
24 | |
25 | mod loom; |
26 | |
27 | cfg_codec! { |
28 | #[macro_use ] |
29 | mod tracing; |
30 | |
31 | pub mod codec; |
32 | } |
33 | |
34 | cfg_net! { |
35 | #[cfg (not(target_arch = "wasm32" ))] |
36 | pub mod udp; |
37 | pub mod net; |
38 | } |
39 | |
40 | cfg_compat! { |
41 | pub mod compat; |
42 | } |
43 | |
44 | cfg_io! { |
45 | pub mod io; |
46 | } |
47 | |
48 | cfg_rt! { |
49 | pub mod context; |
50 | pub mod task; |
51 | } |
52 | |
53 | cfg_time! { |
54 | pub mod time; |
55 | } |
56 | |
57 | pub mod sync; |
58 | |
59 | pub mod either; |
60 | |
61 | pub use bytes; |
62 | |
63 | mod util; |
64 | |