From 9199f1b2b772a7002c4487781fee568cd089f216 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Fri, 23 Aug 2024 16:38:36 +0200 Subject: [PATCH] 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. --- src/client/conn/http1.rs | 2 ++ src/client/conn/http2.rs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/client/conn/http1.rs b/src/client/conn/http1.rs index 647171e764..ecfe6eb8fb 100644 --- a/src/client/conn/http1.rs +++ b/src/client/conn/http1.rs @@ -48,6 +48,8 @@ pub struct Parts { /// /// 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 where diff --git a/src/client/conn/http2.rs b/src/client/conn/http2.rs index ce86c6dcb4..3db28957b6 100644 --- a/src/client/conn/http2.rs +++ b/src/client/conn/http2.rs @@ -37,6 +37,8 @@ impl Clone for SendRequest { /// /// 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 where