From 492ab246319504974b59c3b8212970d2844d7838 Mon Sep 17 00:00:00 2001 From: Hugo Date: Fri, 23 Aug 2024 18:55:14 +0200 Subject: [PATCH] docs(client): Link from Connection to handshake (#3742) 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