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