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

Add ReaderStream #2714

Merged
merged 7 commits into from
Aug 23, 2020
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
Next Next commit
docs
  • Loading branch information
MikailBag committed Aug 9, 2020
commit f58b6b9dea2e9b63bc0d20c6f8df139712f078f9
8 changes: 6 additions & 2 deletions tokio/src/io/util/reader_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ pin_project! {
}
}

/// Convert an [`AsyncRead`](crate::io::AsyncRead) implementor into a
/// [`Stream`](crate::stream::Stream) of Result<[`Bytes`](bytes::Bytes), io::Error>.
/// Convert an [`AsyncRead`] implementor into a
/// [`Stream`] of Result<[`Bytes`], std::io::Error>.
///
/// # Example
///
Expand All @@ -47,7 +47,11 @@ pin_project! {
/// assert_eq!(stream_contents, data);
/// # Ok(())
/// # }
///
/// ```
/// [`AsyncRead`]: crate::io::AsyncRead
/// [`Stream`]: crate::stream::Stream
/// [`Bytes`]: bytes::Bytes
pub fn reader_stream<R>(reader: R) -> ReaderStream<R>
where
R: AsyncRead,
Expand Down