Skip to content

Commit

Permalink
docs(body): add links to to_bytes and aggregate (#2464)
Browse files Browse the repository at this point in the history
Since these two functions are not methods on the `Body`, they aren't
very discoverable. So a note in the docs would definitely be helpful.
  • Loading branch information
dbrgn committed Mar 15, 2021
1 parent 297a068 commit eb0e718
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/body/body.rs
Expand Up @@ -29,6 +29,9 @@ type TrailersSender = oneshot::Sender<HeaderMap>;
///
/// A good default [`HttpBody`](crate::body::HttpBody) to use in many
/// applications.
///
/// Note: To read the full body, use [`body::to_bytes`](crate::body::to_bytes)
/// or [`body::aggregate`](crate::body::aggregate).
#[must_use = "streams do nothing unless polled"]
pub struct Body {
kind: Kind,
Expand Down

0 comments on commit eb0e718

Please sign in to comment.