From 3ef7c1a37b635e8446322d8f8d3a68580a208ad8 Mon Sep 17 00:00:00 2001 From: Chrislearn Young Date: Wed, 14 Jun 2023 23:17:22 +0800 Subject: [PATCH] Fix `cargo doc` warning (#193) --- h3-quinn/src/lib.rs | 2 +- h3-webtransport/src/lib.rs | 4 ++-- h3-webtransport/src/server.rs | 2 +- h3/src/connection.rs | 2 +- h3/src/error.rs | 2 +- h3/src/ext.rs | 4 ++-- h3/src/proto/frame.rs | 2 +- h3/src/quic.rs | 4 ++-- h3/src/server.rs | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/h3-quinn/src/lib.rs b/h3-quinn/src/lib.rs index 78696dec..54c39f04 100644 --- a/h3-quinn/src/lib.rs +++ b/h3-quinn/src/lib.rs @@ -43,7 +43,7 @@ pub struct Connection { } impl Connection { - /// Create a [`Connection`] from a [`quinn::NewConnection`] + /// Create a [`Connection`] from a [`quinn::Connection`] pub fn new(conn: quinn::Connection) -> Self { Self { conn: conn.clone(), diff --git a/h3-webtransport/src/lib.rs b/h3-webtransport/src/lib.rs index 9900311a..85762d45 100644 --- a/h3-webtransport/src/lib.rs +++ b/h3-webtransport/src/lib.rs @@ -1,8 +1,8 @@ //! Provides the client and server support for WebTransport sessions. //! //! # Relevant Links -//! WebTransport: https://www.w3.org/TR/webtransport/#biblio-web-transport-http3 -//! WebTransport over HTTP/3: https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3/ +//! WebTransport: +//! WebTransport over HTTP/3: #![deny(missing_docs)] /// Server side WebTransport session support diff --git a/h3-webtransport/src/server.rs b/h3-webtransport/src/server.rs index 3a212dd1..fd24ed4d 100644 --- a/h3-webtransport/src/server.rs +++ b/h3-webtransport/src/server.rs @@ -34,7 +34,7 @@ use crate::stream::{BidiStream, RecvStream, SendStream}; /// /// Maintains the session using the underlying HTTP/3 connection. /// -/// Similar to [`crate::Connection`] it is generic over the QUIC implementation and Buffer. +/// Similar to [`h3::server::Connection`](https://docs.rs/h3/latest/h3/server/struct.Connection.html) it is generic over the QUIC implementation and Buffer. pub struct WebTransportSession where C: quic::Connection, diff --git a/h3/src/connection.rs b/h3/src/connection.rs index 8c455657..dbb746dd 100644 --- a/h3/src/connection.rs +++ b/h3/src/connection.rs @@ -113,7 +113,7 @@ where /// /// This is opposed to discarding them by returning in `poll_accept_recv`, which may cause them to be missed by something else polling. /// - /// See: https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3/#section-4.5 + /// See: /// /// In WebTransport over HTTP/3, the client MAY send its SETTINGS frame, as well as /// multiple WebTransport CONNECT requests, WebTransport data streams and WebTransport diff --git a/h3/src/error.rs b/h3/src/error.rs index 02663f7d..b622262c 100644 --- a/h3/src/error.rs +++ b/h3/src/error.rs @@ -113,7 +113,7 @@ macro_rules! codes { codes! { /// Datagram or capsule parse error - /// See: https://www.rfc-editor.org/rfc/rfc9297#section-5.2 + /// See: (0x33, H3_DATAGRAM_ERROR); /// No error. This is used when the connection or stream needs to be /// closed, but there is no error to signal. diff --git a/h3/src/ext.rs b/h3/src/ext.rs index 1ef8a14e..9c42f441 100644 --- a/h3/src/ext.rs +++ b/h3/src/ext.rs @@ -13,7 +13,7 @@ use crate::{ /// Describes the `:protocol` pseudo-header for extended connect /// -/// See: [https://www.rfc-editor.org/rfc/rfc8441#section-4] +/// See: #[derive(Copy, PartialEq, Debug, Clone)] pub struct Protocol(ProtocolInner); @@ -42,7 +42,7 @@ impl FromStr for Protocol { } /// HTTP datagram frames -/// See: https://www.rfc-editor.org/rfc/rfc9297#section-2.1 +/// See: pub struct Datagram { /// Stream id divided by 4 stream_id: StreamId, diff --git a/h3/src/proto/frame.rs b/h3/src/proto/frame.rs index f587d01a..8666f520 100644 --- a/h3/src/proto/frame.rs +++ b/h3/src/proto/frame.rs @@ -77,7 +77,7 @@ impl From for PayloadLen { impl Frame { pub const MAX_ENCODED_SIZE: usize = VarInt::MAX_SIZE * 7; - /// Decodes a Frame from the stream according to https://www.rfc-editor.org/rfc/rfc9114#section-7.1 + /// Decodes a Frame from the stream according to pub fn decode(buf: &mut T) -> Result { let remaining = buf.remaining(); let ty = FrameType::decode(buf).map_err(|_| FrameError::Incomplete(remaining + 1))?; diff --git a/h3/src/quic.rs b/h3/src/quic.rs index de1ecf4c..bb382a33 100644 --- a/h3/src/quic.rs +++ b/h3/src/quic.rs @@ -85,7 +85,7 @@ pub trait Connection { /// Extends the `Connection` trait for sending datagrams /// -/// See: https://www.rfc-editor.org/rfc/rfc9297 +/// See: pub trait SendDatagramExt { /// The error type that can occur when sending a datagram type Error: Into>; @@ -96,7 +96,7 @@ pub trait SendDatagramExt { /// Extends the `Connection` trait for receiving datagrams /// -/// See: https://www.rfc-editor.org/rfc/rfc9297 +/// See: pub trait RecvDatagramExt { /// The type of `Buf` for *raw* datagrams (without the stream_id decoded) type Buf: Buf; diff --git a/h3/src/server.rs b/h3/src/server.rs index 7416fabb..3e220f1e 100644 --- a/h3/src/server.rs +++ b/h3/src/server.rs @@ -602,7 +602,7 @@ impl Builder { /// Indicates that the client or server supports HTTP/3 datagrams /// - /// See: https://www.rfc-editor.org/rfc/rfc9297#section-2.1.1 + /// See: pub fn enable_datagram(&mut self, value: bool) -> &mut Self { self.config.enable_datagram = value; self