diff --git a/src/body/incoming.rs b/src/body/incoming.rs index ad5bd16116..18b32a78d7 100644 --- a/src/body/incoming.rs +++ b/src/body/incoming.rs @@ -19,6 +19,20 @@ type BodySender = mpsc::Sender>; type TrailersSender = oneshot::Sender; /// A stream of `Bytes`, used when receiving bodies from the network. +/// +/// Note that Users should not instantiate this struct directly. When working with the hyper client, +/// `Incoming` is returned to you in responses. Similarly, when operating with the hyper server, +/// it is provided within requests. +/// +/// # Examples +/// +/// ```rust,ignore +/// async fn echo( +/// req: Request, +/// ) -> Result>, hyper::Error> { +/// //Here, you can process `Incoming` +/// } +/// ``` #[must_use = "streams do nothing unless polled"] pub struct Incoming { kind: Kind,