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]
23mod cfg;
24
25mod loom;
26
27cfg_codec! {
28 pub mod codec;
29}
30
31cfg_net! {
32 #[cfg(not(target_arch = "wasm32"))]
33 pub mod udp;
34 pub mod net;
35}
36
37cfg_compat! {
38 pub mod compat;
39}
40
41cfg_io! {
42 pub mod io;
43}
44
45cfg_rt! {
46 pub mod context;
47 pub mod task;
48}
49
50cfg_time! {
51 pub mod time;
52}
53
54pub mod sync;
55
56pub mod either;
57
58pub use bytes;
59
60mod util;
61