From eb0e7186963bbe4fa1ad4478ac493f75ddc92ae5 Mon Sep 17 00:00:00 2001 From: Danilo Bargen Date: Mon, 15 Mar 2021 23:40:28 +0100 Subject: [PATCH] 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. --- src/body/body.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/body/body.rs b/src/body/body.rs index 1be2c1b0c2..a1ac6ad3b6 100644 --- a/src/body/body.rs +++ b/src/body/body.rs @@ -29,6 +29,9 @@ type TrailersSender = oneshot::Sender; /// /// 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,