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.
This commit is contained in:
Danilo Bargen
2021-03-15 23:40:28 +01:00
committed by GitHub
parent 297a068454
commit eb0e718696

View File

@@ -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,