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