File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ impl<R: AsyncRead> ReaderStream<R> {
5858 /// Convert an [`AsyncRead`] into a [`Stream`] with item type
5959 /// `Result<Bytes, std::io::Error>`.
6060 ///
61+ /// Currently, the default capacity 4096 bytes (4 KiB).
62+ /// This capacity is not part of the semver contract
63+ /// and may be tweaked in future releases without
64+ /// requiring a major version bump.
65+ ///
6166 /// [`AsyncRead`]: tokio::io::AsyncRead
6267 /// [`Stream`]: futures_core::Stream
6368 pub fn new ( reader : R ) -> Self {
Original file line number Diff line number Diff line change @@ -1070,6 +1070,13 @@ impl TcpStream {
10701070 /// Successive calls return the same data. This is accomplished by passing
10711071 /// `MSG_PEEK` as a flag to the underlying `recv` system call.
10721072 ///
1073+ /// # Cancel safety
1074+ ///
1075+ /// This method is cancel safe. If the method is used as the event in a
1076+ /// [`tokio::select!`](crate::select) statement and some other branch
1077+ /// completes first, then it is guaranteed that no peek was performed, and
1078+ /// that `buf` has not been modified.
1079+ ///
10731080 /// # Examples
10741081 ///
10751082 /// ```no_run
You can’t perform that action at this time.
0 commit comments