2019-12-21 00:54:43 +03:00
|
|
|
#![allow(clippy::needless_doctest_main)]
|
2019-10-22 10:13:49 -07:00
|
|
|
#![warn(
|
|
|
|
|
missing_debug_implementations,
|
|
|
|
|
missing_docs,
|
|
|
|
|
rust_2018_idioms,
|
|
|
|
|
unreachable_pub
|
|
|
|
|
)]
|
|
|
|
|
#![doc(test(
|
|
|
|
|
no_crate_inject,
|
|
|
|
|
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
|
|
|
|
|
))]
|
2019-11-22 15:55:10 -08:00
|
|
|
#![cfg_attr(docsrs, feature(doc_cfg))]
|
2019-10-22 10:13:49 -07:00
|
|
|
|
|
|
|
|
//! Utilities for working with Tokio.
|
2020-03-04 17:27:18 -05:00
|
|
|
//!
|
|
|
|
|
//! This crate is not versioned in lockstep with the core
|
|
|
|
|
//! [`tokio`] crate. However, `tokio-util` _will_ respect Rust's
|
|
|
|
|
//! semantic versioning policy, especially with regard to breaking changes.
|
2019-10-22 10:13:49 -07:00
|
|
|
|
2019-11-22 15:55:10 -08:00
|
|
|
#[macro_use]
|
|
|
|
|
mod cfg;
|
|
|
|
|
|
2020-08-23 08:45:52 -07:00
|
|
|
mod loom;
|
|
|
|
|
|
2019-11-22 15:55:10 -08:00
|
|
|
cfg_codec! {
|
2024-03-30 18:20:05 +01:00
|
|
|
#[macro_use]
|
|
|
|
|
mod tracing;
|
|
|
|
|
|
2019-11-22 15:55:10 -08:00
|
|
|
pub mod codec;
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-06 10:59:15 -05:00
|
|
|
cfg_net! {
|
2022-07-12 16:20:26 -04:00
|
|
|
#[cfg(not(target_arch = "wasm32"))]
|
2019-11-22 15:55:10 -08:00
|
|
|
pub mod udp;
|
2022-01-27 15:13:37 +01:00
|
|
|
pub mod net;
|
2019-11-22 15:55:10 -08:00
|
|
|
}
|
2020-01-29 11:14:24 -08:00
|
|
|
|
|
|
|
|
cfg_compat! {
|
|
|
|
|
pub mod compat;
|
|
|
|
|
}
|
2020-08-23 08:45:52 -07:00
|
|
|
|
2020-09-08 09:12:32 +02:00
|
|
|
cfg_io! {
|
|
|
|
|
pub mod io;
|
|
|
|
|
}
|
|
|
|
|
|
2020-10-13 06:13:23 +09:00
|
|
|
cfg_rt! {
|
2020-10-12 13:44:54 -04:00
|
|
|
pub mod context;
|
|
|
|
|
}
|
2020-08-27 17:33:43 +02:00
|
|
|
|
2025-08-03 08:58:28 +01:00
|
|
|
#[cfg(feature = "rt")]
|
|
|
|
|
pub mod task;
|
|
|
|
|
|
2021-03-11 17:02:01 +02:00
|
|
|
cfg_time! {
|
|
|
|
|
pub mod time;
|
|
|
|
|
}
|
|
|
|
|
|
2020-08-23 08:45:52 -07:00
|
|
|
pub mod sync;
|
2020-09-08 10:14:08 +03:00
|
|
|
|
|
|
|
|
pub mod either;
|
2020-09-24 17:26:03 -07:00
|
|
|
|
2023-05-28 13:12:40 -04:00
|
|
|
pub use bytes;
|
|
|
|
|
|
2023-06-28 04:10:18 -03:00
|
|
|
mod util;
|
2025-07-29 18:09:13 +08:00
|
|
|
|
|
|
|
|
pub mod future;
|