io: document the default capacity of the ReaderStream (#7147)

Signed-off-by: ADD-SP <[email protected]>
Co-authored-by: Qi <[email protected]>
This commit is contained in:
Owen Griffiths
2025-12-12 23:22:17 +08:00
committed by GitHub
co-authored by Qi
parent 97d06ae1a6
commit 0ec0a85461
+5
View File
@@ -58,6 +58,11 @@ impl<R: AsyncRead> ReaderStream<R> {
/// Convert an [`AsyncRead`] into a [`Stream`] with item type
/// `Result<Bytes, std::io::Error>`.
///
/// 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 {