Skip to content

Commit

Permalink
docs: Link from Connection to handshake
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
WhyNotHugo committed Aug 23, 2024
1 parent 4c84e8c commit 9199f1b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/client/conn/http1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ pub struct Parts<T> {
///
/// In most cases, this should just be spawned into an executor, so that it
/// can process incoming and outgoing messages, notice hangups, and the like.
///
/// Instances of this type are typically created via the [`handshake`] function
#[must_use = "futures do nothing unless polled"]
pub struct Connection<T, B>
where
Expand Down
2 changes: 2 additions & 0 deletions src/client/conn/http2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ impl<B> Clone for SendRequest<B> {
///
/// In most cases, this should just be spawned into an executor, so that it
/// can process incoming and outgoing messages, notice hangups, and the like.
///
/// Instances of this type are typically created via the [`handshake`] function
#[must_use = "futures do nothing unless polled"]
pub struct Connection<T, B, E>
where
Expand Down

0 comments on commit 9199f1b

Please sign in to comment.