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 81eda3e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/client/conn/http1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ 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
///
/// [`handshake`]: crate::client::conn::http1::handshake
#[must_use = "futures do nothing unless polled"]
pub struct Connection<T, B>
where
Expand Down
4 changes: 4 additions & 0 deletions src/client/conn/http2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ 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
///
/// [`handshake`]: crate::client::conn::http2::handshake
#[must_use = "futures do nothing unless polled"]
pub struct Connection<T, B, E>
where
Expand Down

0 comments on commit 81eda3e

Please sign in to comment.