Skip to content

Commit c08df0f

Browse files
committed
re-export HTTP bodies
1 parent c6e9750 commit c08df0f

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/http/body.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
33
use crate::io::{AsyncRead, Cursor};
44

5+
pub use super::response::IncomingBody;
6+
57
/// A trait representing an HTTP body.
8+
#[doc(hidden)]
69
pub trait Body: AsyncRead {
710
/// Returns the exact remaining length of the iterator, if known.
811
fn len(&self) -> Option<usize>;
@@ -14,6 +17,7 @@ pub trait Body: AsyncRead {
1417
}
1518

1619
/// Conversion into a `Body`.
20+
#[doc(hidden)]
1721
pub trait IntoBody {
1822
/// What type of `Body` are we turning this into?
1923
type IntoBody: Body;

src/http/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
33
pub use url::Url;
44

5-
pub use body::*;
5+
#[doc(inline)]
6+
pub use body::{Body, IntoBody};
67
pub use client::Client;
78
pub use error::{Error, Result};
89
pub use fields::{FieldName, FieldValue, Fields, Headers, Trailers};
@@ -11,7 +12,7 @@ pub use request::Request;
1112
pub use response::Response;
1213
pub use status_code::StatusCode;
1314

14-
mod body;
15+
pub mod body;
1516

1617
mod client;
1718
mod error;

src/http/response.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ impl<B: Body> Response<B> {
9898
}
9999
}
100100

101+
/// An incoming HTTP body
101102
#[derive(Debug)]
102103
pub struct IncomingBody {
103104
reactor: Reactor,

0 commit comments

Comments
 (0)