tokio_util/
lib.rs

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