Skip to content

Commit 9199f1b

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 9199f1b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/client/conn/http1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ 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+
/// Instances of this type are typically created via the [`handshake`] function
5153
#[must_use = "futures do nothing unless polled"]
5254
pub struct Connection<T, B>
5355
where

src/client/conn/http2.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ 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+
/// Instances of this type are typically created via the [`handshake`] function
4042
#[must_use = "futures do nothing unless polled"]
4143
pub struct Connection<T, B, E>
4244
where

0 commit comments

Comments
 (0)