Skip to content

Commit dedd3b7

Browse files
authored
Document the typical value for an io param
Per rust-lang/rust#84824, it can be hard to figure out from the trait bounds what types meet those bounds.
1 parent 0d82405 commit dedd3b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/client/conn.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ where
8787
H2(#[pin] proto::h2::ClientTask<B>, PhantomData<fn(T)>),
8888
}
8989

90-
/// Returns a handshake future over some IO.
90+
/// Returns a handshake future over some IO. The io parameter will usually be a
91+
/// [tokio::net::TcpStream](https://docs.rs/tokio/1.6.1/tokio/net/struct.TcpStream.html).
9192
///
9293
/// This is a shortcut for `Builder::new().handshake(io)`.
9394
pub async fn handshake<T>(
@@ -106,6 +107,9 @@ pub struct SendRequest<B> {
106107

107108
/// A future that processes all HTTP state for the IO object.
108109
///
110+
/// The io parameter will usually be a
111+
/// [tokio::net::TcpStream](https://docs.rs/tokio/1.6.1/tokio/net/struct.TcpStream.html).
112+
///
109113
/// In most cases, this should just be spawned into an executor, so that it
110114
/// can process incoming and outgoing messages, notice hangups, and the like.
111115
#[must_use = "futures do nothing unless polled"]

0 commit comments

Comments
 (0)