Skip to content

Commit 22c9306

Browse files
committed
Revert to original/master
1 parent ea22b4f commit 22c9306

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

src/client/decode.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const CR: u8 = b'\r';
1616
const LF: u8 = b'\n';
1717

1818
/// Decode an HTTP response on the client.
19+
#[doc(hidden)]
1920
pub async fn decode<R>(reader: R) -> http_types::Result<Response>
2021
where
2122
R: Read + Unpin + Send + Sync + 'static,

src/client/encode.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ use http_types::{headers::HOST, Method, Request};
77
use std::pin::Pin;
88

99
/// An HTTP encoder.
10+
#[doc(hidden)]
1011
#[derive(Debug)]
1112
pub struct Encoder {
1213
/// Keep track how far we've indexed into the headers + body.

src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ const MAX_HEAD_LENGTH: usize = 8 * 1024;
106106

107107
mod chunked;
108108
mod date;
109-
pub mod server;
109+
mod server;
110110

111+
#[doc(hidden)]
111112
pub mod client;
112113

113114
pub use client::connect;

src/server/decode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const LF: u8 = b'\n';
1717
const HTTP_1_1_VERSION: u8 = 1;
1818

1919
/// Decode an HTTP request on the server.
20-
pub async fn decode<IO>(mut io: IO) -> http_types::Result<Option<Request>>
20+
pub(crate) async fn decode<IO>(mut io: IO) -> http_types::Result<Option<Request>>
2121
where
2222
IO: Read + Write + Clone + Send + Sync + Unpin + 'static,
2323
{

src/server/encode.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::date::fmt_http_date;
1515
///
1616
/// This is returned from [`encode`].
1717
#[derive(Debug)]
18-
pub struct Encoder {
18+
pub(crate) struct Encoder {
1919
/// The current level of recursion the encoder is in.
2020
depth: u16,
2121
/// HTTP headers to be sent.
@@ -71,7 +71,7 @@ impl Read for Encoder {
7171

7272
impl Encoder {
7373
/// Create a new instance of Encoder.
74-
pub fn new(res: Response) -> Self {
74+
pub(crate) fn new(res: Response, method: Method) -> Self {
7575
Self {
7676
res,
7777
depth: 0,

src/server/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
use std::time::Duration;
44

55
use async_std::future::{timeout, Future, TimeoutError};
6-
use async_std::io::{self, Read, Write};
6+
use async_std::io::{self};
7+
use async_std::io::{Read, Write};
78
use http_types::{Request, Response};
89

910
mod decode;
1011
mod encode;
1112

12-
pub use decode::decode;
13-
pub use encode::Encoder;
13+
use decode::decode;
14+
use encode::Encoder;
1415

1516
/// Configure the server.
1617
#[derive(Debug, Clone)]

0 commit comments

Comments
 (0)