Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io: add copy_bidirectional_with_sizes #6500

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update tokio/src/io/util/copy_bidirectional.rs
Co-authored-by: Alice Ryhl <[email protected]>
  • Loading branch information
RRRadicalEdward and Darksonn committed Apr 22, 2024
commit 3e4df13e9702f27d3317336434ea9c945748bd4e
5 changes: 4 additions & 1 deletion tokio/src/io/util/copy_bidirectional.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ where
.await
}

/// The same as the [`copy_bidirectional()`], but allows to set the underlying `a` to `b` and `b` to `a` buffers sizes.
/// Copies data in both directions between `a` and `b` using buffers of the specified size.
///
/// This method is the same as the [`copy_bidirectional()`], except that it allows you to set the
/// size of the internal buffers used when copying data.
#[cfg_attr(docsrs, doc(cfg(feature = "io-util")))]
pub async fn copy_bidirectional_with_sizes<A, B>(
a: &mut A,
Expand Down
Loading