From 0ec0a8546105b9f250f868b77e42c82809703aab Mon Sep 17 00:00:00 2001 From: Owen Griffiths Date: Fri, 12 Dec 2025 15:22:17 +0000 Subject: [PATCH] io: document the default capacity of the `ReaderStream` (#7147) Signed-off-by: ADD-SP Co-authored-by: Qi --- tokio-util/src/io/reader_stream.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tokio-util/src/io/reader_stream.rs b/tokio-util/src/io/reader_stream.rs index 93bc594f2..e0348dac7 100644 --- a/tokio-util/src/io/reader_stream.rs +++ b/tokio-util/src/io/reader_stream.rs @@ -58,6 +58,11 @@ impl ReaderStream { /// Convert an [`AsyncRead`] into a [`Stream`] with item type /// `Result`. /// + /// Currently, the default capacity 4096 bytes (4 KiB). + /// This capacity is not part of the semver contract + /// and may be tweaked in future releases without + /// requiring a major version bump. + /// /// [`AsyncRead`]: tokio::io::AsyncRead /// [`Stream`]: futures_core::Stream pub fn new(reader: R) -> Self {