Skip to content

Commit 306d4a9

Browse files
committed
docs: Link from Connection to handshake
When reading the documentation for `Connection` it is not entirely obvious how instances of this type are obtained. Add a helpful link, mostly for those less familiar.
1 parent 4c84e8c commit 306d4a9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/client/conn/http1.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ pub struct Parts<T> {
4848
///
4949
/// In most cases, this should just be spawned into an executor, so that it
5050
/// can process incoming and outgoing messages, notice hangups, and the like.
51+
///
52+
/// # See also
53+
///
54+
/// Instances of this type are typically created via the [`handshake`] function
55+
///
56+
/// [`handshake`]: crate::client::conn::http1::handshake
5157
#[must_use = "futures do nothing unless polled"]
5258
pub struct Connection<T, B>
5359
where

src/client/conn/http2.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ impl<B> Clone for SendRequest<B> {
3737
///
3838
/// In most cases, this should just be spawned into an executor, so that it
3939
/// can process incoming and outgoing messages, notice hangups, and the like.
40+
///
41+
/// # See also
42+
///
43+
/// Instances of this type are typically created via the [`handshake`] function
44+
///
45+
/// [`handshake`]: crate::client::conn::http2::handshake
4046
#[must_use = "futures do nothing unless polled"]
4147
pub struct Connection<T, B, E>
4248
where

0 commit comments

Comments
 (0)