diff --git a/viz-core/src/body.rs b/viz-core/src/body.rs index 8b741089..c11bb279 100644 --- a/viz-core/src/body.rs +++ b/viz-core/src/body.rs @@ -9,23 +9,25 @@ use hyper::body::{Body, Frame, Incoming, SizeHint}; use crate::{Bytes, Error, Result}; -/// Incoming Body from request. +/// The incoming body from HTTP [`Request`]. +/// +/// [`Request`]: crate::Request #[derive(Debug)] pub enum IncomingBody { - /// A empty body. + /// An empty body. Empty, - /// A incoming body. + /// An incoming body. Incoming(Option), } impl IncomingBody { - /// Creates new Incoming Body + /// Creates new incoming body. #[must_use] pub fn new(inner: Option) -> Self { Self::Incoming(inner) } - /// Incoming body has been used + /// The incoming body has been used. #[must_use] pub fn used() -> Self { Self::Incoming(None) @@ -107,10 +109,12 @@ impl Stream for IncomingBody { } } -/// Outgoing Body to response. +/// The outgoing body to HTTP [`Response`]. +/// +/// [`Response`]: crate::Response #[derive(Debug)] pub enum OutgoingBody { - /// A empty body. + /// An empty body. Empty, /// A body that consists of a single chunk. Full(Full),