From 490b6f332ba8434c76f0e4891ae24efa846adf72 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 20 Jan 2024 07:48:11 +0900 Subject: [PATCH 1/3] doc(core): Header encode method convert header to HeaderValue --- headers-core/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers-core/src/lib.rs b/headers-core/src/lib.rs index 5692b65a..42719411 100644 --- a/headers-core/src/lib.rs +++ b/headers-core/src/lib.rs @@ -29,7 +29,7 @@ pub trait Header { Self: Sized, I: Iterator; - /// Encode this type to a `HeaderMap`. + /// Encode this type to a `HeaderValue`. /// /// This function should be infallible. Any errors converting to a /// `HeaderValue` should have been caught when parsing or constructing From 7b91e075baace1440b481f74c63c1ed3ce0a163b Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 20 Jan 2024 07:51:51 +0900 Subject: [PATCH 2/3] doc(core): add link to Header document --- headers-core/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headers-core/src/lib.rs b/headers-core/src/lib.rs index 42719411..eca25a1c 100644 --- a/headers-core/src/lib.rs +++ b/headers-core/src/lib.rs @@ -23,13 +23,13 @@ pub trait Header { /// The name of this header. fn name() -> &'static HeaderName; - /// Decode this type from an iterator of `HeaderValue`s. + /// Decode this type from an iterator of [`HeaderValue`]s. fn decode<'i, I>(values: &mut I) -> Result where Self: Sized, I: Iterator; - /// Encode this type to a `HeaderValue`. + /// Encode this type to a [`HeaderValue`]. /// /// This function should be infallible. Any errors converting to a /// `HeaderValue` should have been caught when parsing or constructing From f635a1777905ac6bb1082c3f094422ff677bbce8 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 20 Jan 2024 08:28:08 +0900 Subject: [PATCH 3/3] doc(core): add detailed document to Header encode method --- headers-core/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/headers-core/src/lib.rs b/headers-core/src/lib.rs index eca25a1c..d5a05d6f 100644 --- a/headers-core/src/lib.rs +++ b/headers-core/src/lib.rs @@ -29,7 +29,8 @@ pub trait Header { Self: Sized, I: Iterator; - /// Encode this type to a [`HeaderValue`]. + /// Encode this type to a [`HeaderValue`], and add it to a container + /// which has [`HeaderValue`] type as each element. /// /// This function should be infallible. Any errors converting to a /// `HeaderValue` should have been caught when parsing or constructing