mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user