We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f00e8ad commit 20a54c7Copy full SHA for 20a54c7
1 file changed
src/lib.rs
@@ -802,3 +802,19 @@ xmacro::xmacro! {
802
}
803
804
805
+
806
+impl From<&str> for HeaderVec<(), u8> {
807
+ fn from(from: &str) -> Self {
808
+ let mut hv = HeaderVec::new(());
809
+ hv.extend_from_slice(from.as_bytes());
810
+ hv
811
+ }
812
+}
813
814
+impl<H> From<WithHeader<H, &str>> for HeaderVec<H, u8> {
815
+ fn from(from: WithHeader<H, &str>) -> Self {
816
+ let mut hv = HeaderVec::new(from.0);
817
+ hv.extend_from_slice(from.1.as_bytes());
818
819
820
0 commit comments