tokio_util/
lib.rs

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