From 0dbd90d2e4c7907a0a594c69b1f5c3fd1087c9dd Mon Sep 17 00:00:00 2001 From: blackanger Date: Fri, 3 Nov 2023 11:48:29 +0800 Subject: [PATCH 1/4] doc(body:incoming): reference http-body-incoming for more explain doc(body:incoming): reference http-body-incoming for more explain:update doc(body:incoming): reference http-body-incoming for more explain:delete .vscode --- src/body/incoming.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/body/incoming.rs b/src/body/incoming.rs index ad5bd16116..c9300691eb 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, From db45361c967c041c62847560aa003227dc9762ae Mon Sep 17 00:00:00 2001 From: blackanger Date: Sun, 12 Nov 2023 20:11:52 +0800 Subject: [PATCH 2/4] doc(body:incoming): reference http-body-incoming for more explain:fmt --- src/body/incoming.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/body/incoming.rs b/src/body/incoming.rs index c9300691eb..18b32a78d7 100644 --- a/src/body/incoming.rs +++ b/src/body/incoming.rs @@ -20,7 +20,7 @@ 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, +/// 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. /// @@ -30,7 +30,7 @@ type TrailersSender = oneshot::Sender; /// async fn echo( /// req: Request, /// ) -> Result>, hyper::Error> { -/// //Here, you can process `Incoming` +/// //Here, you can process `Incoming` /// } /// ``` #[must_use = "streams do nothing unless polled"] From 1b05bedbde8c0a6e11f9604968d189fa9558b8dd Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 13 Nov 2023 20:15:44 +0800 Subject: [PATCH 3/4] Update CI.yml --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3ba2aa2459..c5b7dbdf92 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,6 +4,7 @@ on: push: branches: - master + - doc-incoming env: RUST_BACKTRACE: 1 From a95f00326b9c1339a32dc71b11f32187bbcea1b1 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 13 Nov 2023 20:26:17 +0800 Subject: [PATCH 4/4] Update CI.yml --- .github/workflows/CI.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c5b7dbdf92..3ba2aa2459 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -4,7 +4,6 @@ on: push: branches: - master - - doc-incoming env: RUST_BACKTRACE: 1