Skip to content

Commit 6951466

Browse files
oddgrdseanmonstar
authored andcommitted
docs(server): expand server connection docs
1 parent a6dbda1 commit 6951466

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/server/conn/http1.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ type Http1Dispatcher<T, B, S> = proto::h1::Dispatcher<
2222
>;
2323

2424
pin_project_lite::pin_project! {
25-
/// A future binding an http1 connection with a Service.
25+
/// A [`Future`](core::future::Future) representing an HTTP/1 connection, bound to a
26+
/// [`Service`](crate::service::Service), returned from
27+
/// [`Builder::serve_connection`](struct.Builder.html#method.serve_connection).
2628
///
27-
/// Polling this future will drive HTTP forward.
29+
/// To drive HTTP on this connection this future **must be polled**, typically with
30+
/// `.await`. If it isn't polled, no progress will be made on this connection.
2831
#[must_use = "futures do nothing unless polled"]
2932
pub struct Connection<T, S>
3033
where

src/server/conn/http2.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ use crate::service::HttpService;
1616
use crate::{common::time::Time, rt::Timer};
1717

1818
pin_project! {
19-
/// A future binding an HTTP/2 connection with a Service.
19+
/// A [`Future`](core::future::Future) representing an HTTP/2 connection, bound to a
20+
/// [`Service`](crate::service::Service), returned from
21+
/// [`Builder::serve_connection`](struct.Builder.html#method.serve_connection).
2022
///
21-
/// Polling this future will drive HTTP forward.
23+
/// To drive HTTP on this connection this future **must be polled**, typically with
24+
/// `.await`. If it isn't polled, no progress will be made on this connection.
2225
#[must_use = "futures do nothing unless polled"]
2326
pub struct Connection<T, S, E>
2427
where

0 commit comments

Comments
 (0)