Skip to content

Commit eb0e718

Browse files
authored
docs(body): add links to to_bytes and aggregate (#2464)
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.
1 parent 297a068 commit eb0e718

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/body/body.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ type TrailersSender = oneshot::Sender<HeaderMap>;
2929
///
3030
/// A good default [`HttpBody`](crate::body::HttpBody) to use in many
3131
/// applications.
32+
///
33+
/// Note: To read the full body, use [`body::to_bytes`](crate::body::to_bytes)
34+
/// or [`body::aggregate`](crate::body::aggregate).
3235
#[must_use = "streams do nothing unless polled"]
3336
pub struct Body {
3437
kind: Kind,

0 commit comments

Comments
 (0)