File tree Expand file tree Collapse file tree 8 files changed +18
-9
lines changed Expand file tree Collapse file tree 8 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ use crate::util::BufList;
12
12
13
13
/// A collected body produced by [`BodyExt::collect`] which collects all the DATA frames
14
14
/// and trailers.
15
+ ///
16
+ /// [`BodyExt::collect`]: crate::BodyExt::collect
15
17
#[ derive( Debug ) ]
16
18
pub struct Collected < B > {
17
19
bufs : BufList < B > ,
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ use http_body::Body;
8
8
use pin_project_lite:: pin_project;
9
9
10
10
pin_project ! {
11
- /// Future that resolves into a `Collected`.
11
+ /// Future that resolves into a [`Collected`].
12
+ ///
13
+ /// [`Collected`]: crate::Collected
12
14
pub struct Collect <T >
13
15
where
14
16
T : Body ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ use core::task;
6
6
7
7
#[ must_use = "futures don't do anything unless polled" ]
8
8
#[ derive( Debug ) ]
9
- /// Future that resolves to the next frame from a `Body`.
9
+ /// Future that resolves to the next frame from a [ `Body`] .
10
10
pub struct Frame < ' a , T : ?Sized > ( pub ( crate ) & ' a mut T ) ;
11
11
12
12
impl < ' a , T : Body + Unpin + ?Sized > Future for Frame < ' a , T > {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use std::{
10
10
pin_project ! {
11
11
/// Body returned by the [`map_err`] combinator.
12
12
///
13
- /// [`map_err`]: crate::util:: BodyExt::map_err
13
+ /// [`map_err`]: crate::BodyExt::map_err
14
14
#[ derive( Clone , Copy ) ]
15
15
pub struct MapErr <B , F > {
16
16
#[ pin]
Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ use std::{
9
9
} ;
10
10
11
11
pin_project ! {
12
- /// Body returned by the [`map_data `] combinator.
12
+ /// Body returned by the [`map_frame `] combinator.
13
13
///
14
- /// [`map_data `]: crate::util:: BodyExt::map_data
14
+ /// [`map_frame `]: crate::BodyExt::map_frame
15
15
#[ derive( Clone , Copy ) ]
16
16
pub struct MapFrame <B , F > {
17
17
#[ pin]
Original file line number Diff line number Diff line change @@ -7,8 +7,11 @@ use bytes::Buf;
7
7
use http_body:: { Body , Frame , SizeHint } ;
8
8
use proj:: EitherProj ;
9
9
10
- /// Sum type with two cases: `Left` and `Right`, used if a body can be one of
10
+ /// Sum type with two cases: [ `Left`] and [ `Right`] , used if a body can be one of
11
11
/// two distinct types.
12
+ ///
13
+ /// [`Left`]: Either::Left
14
+ /// [`Right`]: Either::Right
12
15
#[ derive( Debug , Clone , Copy ) ]
13
16
pub enum Either < L , R > {
14
17
/// A value of type `L`
@@ -99,7 +102,7 @@ pub(crate) mod proj {
99
102
//! Right {#[pin] right: R}
100
103
//! }
101
104
//! }
102
- //! ```
105
+ //! ```
103
106
//!
104
107
//! [pin-project-lite]: https://docs.rs/pin-project-lite/latest/pin_project_lite/
105
108
use std:: marker:: PhantomData ;
Original file line number Diff line number Diff line change @@ -33,7 +33,9 @@ pub use self::stream::StreamBody;
33
33
34
34
/// An extension trait for [`http_body::Body`] adding various combinators and adapters
35
35
pub trait BodyExt : http_body:: Body {
36
- /// Returns a future that resolves to the next `Frame`, if any.
36
+ /// Returns a future that resolves to the next [`Frame`], if any.
37
+ ///
38
+ /// [`Frame`]: combinators::Frame
37
39
fn frame ( & mut self ) -> combinators:: Frame < ' _ , Self >
38
40
where
39
41
Self : Unpin ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use std::{
8
8
} ;
9
9
10
10
pin_project ! {
11
- /// A body created from a `Stream`.
11
+ /// A body created from a [ `Stream`] .
12
12
#[ derive( Clone , Copy , Debug ) ]
13
13
pub struct StreamBody <S > {
14
14
#[ pin]
You can’t perform that action at this time.
0 commit comments