diff --git a/http-body-util/src/collected.rs b/http-body-util/src/collected.rs index 34e3bf7..c5eb041 100644 --- a/http-body-util/src/collected.rs +++ b/http-body-util/src/collected.rs @@ -12,6 +12,8 @@ use crate::util::BufList; /// A collected body produced by [`BodyExt::collect`] which collects all the DATA frames /// and trailers. +/// +/// [`BodyExt::collect`]: crate::BodyExt::collect #[derive(Debug)] pub struct Collected { bufs: BufList, diff --git a/http-body-util/src/combinators/collect.rs b/http-body-util/src/combinators/collect.rs index 6ba0010..6adfb81 100644 --- a/http-body-util/src/combinators/collect.rs +++ b/http-body-util/src/combinators/collect.rs @@ -8,7 +8,9 @@ use http_body::Body; use pin_project_lite::pin_project; pin_project! { - /// Future that resolves into a `Collected`. + /// Future that resolves into a [`Collected`]. + /// + /// [`Collected`]: crate::Collected pub struct Collect where T: Body, diff --git a/http-body-util/src/combinators/frame.rs b/http-body-util/src/combinators/frame.rs index 6fbe33b..211fa08 100644 --- a/http-body-util/src/combinators/frame.rs +++ b/http-body-util/src/combinators/frame.rs @@ -6,7 +6,7 @@ use core::task; #[must_use = "futures don't do anything unless polled"] #[derive(Debug)] -/// Future that resolves to the next frame from a `Body`. +/// Future that resolves to the next frame from a [`Body`]. pub struct Frame<'a, T: ?Sized>(pub(crate) &'a mut T); impl<'a, T: Body + Unpin + ?Sized> Future for Frame<'a, T> { diff --git a/http-body-util/src/combinators/map_err.rs b/http-body-util/src/combinators/map_err.rs index 1620d70..384cfc5 100644 --- a/http-body-util/src/combinators/map_err.rs +++ b/http-body-util/src/combinators/map_err.rs @@ -10,7 +10,7 @@ use std::{ pin_project! { /// Body returned by the [`map_err`] combinator. /// - /// [`map_err`]: crate::util::BodyExt::map_err + /// [`map_err`]: crate::BodyExt::map_err #[derive(Clone, Copy)] pub struct MapErr { #[pin] diff --git a/http-body-util/src/combinators/map_frame.rs b/http-body-util/src/combinators/map_frame.rs index 578c845..44886bd 100644 --- a/http-body-util/src/combinators/map_frame.rs +++ b/http-body-util/src/combinators/map_frame.rs @@ -9,9 +9,9 @@ use std::{ }; pin_project! { - /// Body returned by the [`map_data`] combinator. + /// Body returned by the [`map_frame`] combinator. /// - /// [`map_data`]: crate::util::BodyExt::map_data + /// [`map_frame`]: crate::BodyExt::map_frame #[derive(Clone, Copy)] pub struct MapFrame { #[pin] diff --git a/http-body-util/src/either.rs b/http-body-util/src/either.rs index 740f207..9e0cc43 100644 --- a/http-body-util/src/either.rs +++ b/http-body-util/src/either.rs @@ -7,8 +7,11 @@ use bytes::Buf; use http_body::{Body, Frame, SizeHint}; use proj::EitherProj; -/// Sum type with two cases: `Left` and `Right`, used if a body can be one of +/// Sum type with two cases: [`Left`] and [`Right`], used if a body can be one of /// two distinct types. +/// +/// [`Left`]: Either::Left +/// [`Right`]: Either::Right #[derive(Debug, Clone, Copy)] pub enum Either { /// A value of type `L` @@ -99,7 +102,7 @@ pub(crate) mod proj { //! Right {#[pin] right: R} //! } //! } - //! ``` + //! ``` //! //! [pin-project-lite]: https://docs.rs/pin-project-lite/latest/pin_project_lite/ use std::marker::PhantomData; diff --git a/http-body-util/src/lib.rs b/http-body-util/src/lib.rs index 0d48e87..931ce61 100644 --- a/http-body-util/src/lib.rs +++ b/http-body-util/src/lib.rs @@ -33,7 +33,9 @@ pub use self::stream::StreamBody; /// An extension trait for [`http_body::Body`] adding various combinators and adapters pub trait BodyExt: http_body::Body { - /// Returns a future that resolves to the next `Frame`, if any. + /// Returns a future that resolves to the next [`Frame`], if any. + /// + /// [`Frame`]: combinators::Frame fn frame(&mut self) -> combinators::Frame<'_, Self> where Self: Unpin, diff --git a/http-body-util/src/stream.rs b/http-body-util/src/stream.rs index 4f8819d..79eea06 100644 --- a/http-body-util/src/stream.rs +++ b/http-body-util/src/stream.rs @@ -8,7 +8,7 @@ use std::{ }; pin_project! { - /// A body created from a `Stream`. + /// A body created from a [`Stream`]. #[derive(Clone, Copy, Debug)] pub struct StreamBody { #[pin]