html-to-markdown 2.28.1 → 2.28.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +6 -6
  3. data/README.md +5 -1
  4. data/ext/html-to-markdown-rb/native/Cargo.lock +1694 -0
  5. data/ext/html-to-markdown-rb/native/Cargo.toml +1 -1
  6. data/lib/html_to_markdown/version.rb +1 -1
  7. data/rust-vendor/html-to-markdown-rs/Cargo.toml +1 -1
  8. data/rust-vendor/libc/.cargo-checksum.json +1 -1
  9. data/rust-vendor/libc/.cargo_vcs_info.json +1 -1
  10. data/rust-vendor/libc/CHANGELOG.md +19 -0
  11. data/rust-vendor/libc/Cargo.lock +1 -1
  12. data/rust-vendor/libc/Cargo.toml +1 -1
  13. data/rust-vendor/libc/Cargo.toml.orig +1 -1
  14. data/rust-vendor/libc/build.rs +3 -3
  15. data/rust-vendor/libc/src/fuchsia/mod.rs +2 -0
  16. data/rust-vendor/libc/src/hermit.rs +1 -0
  17. data/rust-vendor/libc/src/lib.rs +1 -0
  18. data/rust-vendor/libc/src/new/linux_uapi/linux/mod.rs +1 -0
  19. data/rust-vendor/libc/src/new/linux_uapi/linux/pidfd.rs +59 -0
  20. data/rust-vendor/libc/src/new/mod.rs +3 -0
  21. data/rust-vendor/libc/src/new/netbsd/sys/file.rs +16 -0
  22. data/rust-vendor/libc/src/new/netbsd/sys/mod.rs +2 -0
  23. data/rust-vendor/libc/src/new/netbsd/sys/socket.rs +44 -0
  24. data/rust-vendor/libc/src/new/qurt/mod.rs +2 -0
  25. data/rust-vendor/libc/src/solid/mod.rs +1 -0
  26. data/rust-vendor/libc/src/switch.rs +1 -0
  27. data/rust-vendor/libc/src/teeos/mod.rs +2 -0
  28. data/rust-vendor/libc/src/trusty.rs +1 -0
  29. data/rust-vendor/libc/src/unix/bsd/apple/b64/mod.rs +1 -0
  30. data/rust-vendor/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs +31 -0
  31. data/rust-vendor/libc/src/unix/bsd/netbsdlike/openbsd/mod.rs +92 -0
  32. data/rust-vendor/libc/src/unix/hurd/mod.rs +1 -0
  33. data/rust-vendor/libc/src/unix/linux_like/linux/gnu/mod.rs +1 -0
  34. data/rust-vendor/libc/src/unix/linux_like/linux/mod.rs +22 -46
  35. data/rust-vendor/libc/src/unix/mod.rs +2 -0
  36. data/rust-vendor/libc/src/unix/newlib/espidf/mod.rs +2 -0
  37. data/rust-vendor/libc/src/unix/redox/mod.rs +2 -2
  38. data/rust-vendor/libc/src/vxworks/mod.rs +46 -0
  39. data/rust-vendor/libc/src/wasi/mod.rs +2 -0
  40. data/rust-vendor/libc/src/windows/mod.rs +2 -0
  41. data/rust-vendor/zerocopy/.cargo-checksum.json +1 -1
  42. data/rust-vendor/zerocopy/.cargo_vcs_info.json +1 -1
  43. data/rust-vendor/zerocopy/Cargo.lock +3 -3
  44. data/rust-vendor/zerocopy/Cargo.toml +178 -4
  45. data/rust-vendor/zerocopy/Cargo.toml.orig +5 -5
  46. data/rust-vendor/zerocopy/benches/formats/coco_dynamic_padding.rs +24 -0
  47. data/rust-vendor/zerocopy/benches/formats/coco_dynamic_size.rs +23 -0
  48. data/rust-vendor/zerocopy/benches/formats/coco_static_size.rs +23 -0
  49. data/rust-vendor/zerocopy/benches/read_from_bytes.rs +7 -0
  50. data/rust-vendor/zerocopy/benches/read_from_bytes.x86-64 +15 -0
  51. data/rust-vendor/zerocopy/benches/read_from_bytes.x86-64.mca +65 -0
  52. data/rust-vendor/zerocopy/benches/read_from_prefix.rs +10 -0
  53. data/rust-vendor/zerocopy/benches/read_from_prefix.x86-64 +14 -0
  54. data/rust-vendor/zerocopy/benches/read_from_prefix.x86-64.mca +63 -0
  55. data/rust-vendor/zerocopy/benches/read_from_suffix.rs +10 -0
  56. data/rust-vendor/zerocopy/benches/read_from_suffix.x86-64 +15 -0
  57. data/rust-vendor/zerocopy/benches/read_from_suffix.x86-64.mca +65 -0
  58. data/rust-vendor/zerocopy/benches/ref_from_bytes_dynamic_padding.rs +7 -0
  59. data/rust-vendor/zerocopy/benches/ref_from_bytes_dynamic_padding.x86-64 +22 -0
  60. data/rust-vendor/zerocopy/benches/ref_from_bytes_dynamic_padding.x86-64.mca +77 -0
  61. data/rust-vendor/zerocopy/benches/ref_from_bytes_dynamic_size.rs +7 -0
  62. data/rust-vendor/zerocopy/benches/ref_from_bytes_dynamic_size.x86-64 +20 -0
  63. data/rust-vendor/zerocopy/benches/ref_from_bytes_dynamic_size.x86-64.mca +75 -0
  64. data/rust-vendor/zerocopy/benches/ref_from_bytes_static_size.rs +7 -0
  65. data/rust-vendor/zerocopy/benches/ref_from_bytes_static_size.x86-64 +8 -0
  66. data/rust-vendor/zerocopy/benches/ref_from_bytes_static_size.x86-64.mca +53 -0
  67. data/rust-vendor/zerocopy/benches/ref_from_bytes_with_elems_dynamic_padding.rs +10 -0
  68. data/rust-vendor/zerocopy/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64 +30 -0
  69. data/rust-vendor/zerocopy/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64.mca +95 -0
  70. data/rust-vendor/zerocopy/benches/ref_from_bytes_with_elems_dynamic_size.rs +10 -0
  71. data/rust-vendor/zerocopy/benches/ref_from_bytes_with_elems_dynamic_size.x86-64 +16 -0
  72. data/rust-vendor/zerocopy/benches/ref_from_bytes_with_elems_dynamic_size.x86-64.mca +65 -0
  73. data/rust-vendor/zerocopy/benches/ref_from_prefix_dynamic_padding.rs +10 -0
  74. data/rust-vendor/zerocopy/benches/ref_from_prefix_dynamic_padding.x86-64 +22 -0
  75. data/rust-vendor/zerocopy/benches/ref_from_prefix_dynamic_padding.x86-64.mca +77 -0
  76. data/rust-vendor/zerocopy/benches/ref_from_prefix_dynamic_size.rs +10 -0
  77. data/rust-vendor/zerocopy/benches/ref_from_prefix_dynamic_size.x86-64 +17 -0
  78. data/rust-vendor/zerocopy/benches/ref_from_prefix_dynamic_size.x86-64.mca +67 -0
  79. data/rust-vendor/zerocopy/benches/ref_from_prefix_static_size.rs +10 -0
  80. data/rust-vendor/zerocopy/benches/ref_from_prefix_static_size.x86-64 +8 -0
  81. data/rust-vendor/zerocopy/benches/ref_from_prefix_static_size.x86-64.mca +53 -0
  82. data/rust-vendor/zerocopy/benches/ref_from_prefix_with_elems_dynamic_padding.rs +13 -0
  83. data/rust-vendor/zerocopy/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64 +35 -0
  84. data/rust-vendor/zerocopy/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64.mca +101 -0
  85. data/rust-vendor/zerocopy/benches/ref_from_prefix_with_elems_dynamic_size.rs +13 -0
  86. data/rust-vendor/zerocopy/benches/ref_from_prefix_with_elems_dynamic_size.x86-64 +22 -0
  87. data/rust-vendor/zerocopy/benches/ref_from_prefix_with_elems_dynamic_size.x86-64.mca +77 -0
  88. data/rust-vendor/zerocopy/benches/ref_from_suffix_dynamic_padding.rs +10 -0
  89. data/rust-vendor/zerocopy/benches/ref_from_suffix_dynamic_padding.x86-64 +23 -0
  90. data/rust-vendor/zerocopy/benches/ref_from_suffix_dynamic_padding.x86-64.mca +79 -0
  91. data/rust-vendor/zerocopy/benches/ref_from_suffix_dynamic_size.rs +10 -0
  92. data/rust-vendor/zerocopy/benches/ref_from_suffix_dynamic_size.x86-64 +13 -0
  93. data/rust-vendor/zerocopy/benches/ref_from_suffix_dynamic_size.x86-64.mca +63 -0
  94. data/rust-vendor/zerocopy/benches/ref_from_suffix_static_size.rs +10 -0
  95. data/rust-vendor/zerocopy/benches/ref_from_suffix_static_size.x86-64 +13 -0
  96. data/rust-vendor/zerocopy/benches/ref_from_suffix_static_size.x86-64.mca +61 -0
  97. data/rust-vendor/zerocopy/benches/ref_from_suffix_with_elems_dynamic_padding.rs +13 -0
  98. data/rust-vendor/zerocopy/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64 +34 -0
  99. data/rust-vendor/zerocopy/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64.mca +99 -0
  100. data/rust-vendor/zerocopy/benches/ref_from_suffix_with_elems_dynamic_size.rs +13 -0
  101. data/rust-vendor/zerocopy/benches/ref_from_suffix_with_elems_dynamic_size.x86-64 +23 -0
  102. data/rust-vendor/zerocopy/benches/ref_from_suffix_with_elems_dynamic_size.x86-64.mca +77 -0
  103. data/rust-vendor/zerocopy/benches/transmute.rs +16 -0
  104. data/rust-vendor/zerocopy/benches/transmute.x86-64 +3 -0
  105. data/rust-vendor/zerocopy/benches/transmute.x86-64.mca +43 -0
  106. data/rust-vendor/zerocopy/benches/transmute_ref_dynamic_size.rs +16 -0
  107. data/rust-vendor/zerocopy/benches/transmute_ref_dynamic_size.x86-64 +4 -0
  108. data/rust-vendor/zerocopy/benches/transmute_ref_dynamic_size.x86-64.mca +45 -0
  109. data/rust-vendor/zerocopy/benches/transmute_ref_static_size.rs +15 -0
  110. data/rust-vendor/zerocopy/benches/transmute_ref_static_size.x86-64 +3 -0
  111. data/rust-vendor/zerocopy/benches/transmute_ref_static_size.x86-64.mca +43 -0
  112. data/rust-vendor/zerocopy/benches/try_read_from_bytes.rs +7 -0
  113. data/rust-vendor/zerocopy/benches/try_read_from_bytes.x86-64 +23 -0
  114. data/rust-vendor/zerocopy/benches/try_read_from_bytes.x86-64.mca +79 -0
  115. data/rust-vendor/zerocopy/benches/try_read_from_prefix.rs +10 -0
  116. data/rust-vendor/zerocopy/benches/try_read_from_prefix.x86-64 +16 -0
  117. data/rust-vendor/zerocopy/benches/try_read_from_prefix.x86-64.mca +67 -0
  118. data/rust-vendor/zerocopy/benches/try_read_from_suffix.rs +10 -0
  119. data/rust-vendor/zerocopy/benches/try_read_from_suffix.x86-64 +18 -0
  120. data/rust-vendor/zerocopy/benches/try_read_from_suffix.x86-64.mca +71 -0
  121. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_dynamic_padding.rs +7 -0
  122. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_dynamic_padding.x86-64 +24 -0
  123. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_dynamic_padding.x86-64.mca +81 -0
  124. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_dynamic_size.rs +7 -0
  125. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_dynamic_size.x86-64 +22 -0
  126. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_dynamic_size.x86-64.mca +79 -0
  127. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_static_size.rs +7 -0
  128. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_static_size.x86-64 +13 -0
  129. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_static_size.x86-64.mca +59 -0
  130. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_with_elems_dynamic_padding.rs +10 -0
  131. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64 +36 -0
  132. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64.mca +105 -0
  133. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_with_elems_dynamic_size.rs +10 -0
  134. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64 +18 -0
  135. data/rust-vendor/zerocopy/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64.mca +69 -0
  136. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_dynamic_padding.rs +10 -0
  137. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_dynamic_padding.x86-64 +29 -0
  138. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_dynamic_padding.x86-64.mca +91 -0
  139. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_dynamic_size.rs +10 -0
  140. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_dynamic_size.x86-64 +22 -0
  141. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_dynamic_size.x86-64.mca +77 -0
  142. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_static_size.rs +10 -0
  143. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_static_size.x86-64 +15 -0
  144. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_static_size.x86-64.mca +63 -0
  145. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_with_elems_dynamic_padding.rs +13 -0
  146. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64 +35 -0
  147. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64.mca +101 -0
  148. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_with_elems_dynamic_size.rs +13 -0
  149. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64 +26 -0
  150. data/rust-vendor/zerocopy/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64.mca +83 -0
  151. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_dynamic_padding.rs +10 -0
  152. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_dynamic_padding.x86-64 +26 -0
  153. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_dynamic_padding.x86-64.mca +85 -0
  154. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_dynamic_size.rs +10 -0
  155. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_dynamic_size.x86-64 +18 -0
  156. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_dynamic_size.x86-64.mca +71 -0
  157. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_static_size.rs +10 -0
  158. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_static_size.x86-64 +16 -0
  159. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_static_size.x86-64.mca +67 -0
  160. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_padding.rs +13 -0
  161. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64 +39 -0
  162. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64.mca +109 -0
  163. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_size.rs +13 -0
  164. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64 +28 -0
  165. data/rust-vendor/zerocopy/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64.mca +87 -0
  166. data/rust-vendor/zerocopy/benches/try_transmute.rs +16 -0
  167. data/rust-vendor/zerocopy/benches/try_transmute.x86-64 +9 -0
  168. data/rust-vendor/zerocopy/benches/try_transmute.x86-64.mca +55 -0
  169. data/rust-vendor/zerocopy/benches/try_transmute_ref_dynamic_size.rs +18 -0
  170. data/rust-vendor/zerocopy/benches/try_transmute_ref_dynamic_size.x86-64 +6 -0
  171. data/rust-vendor/zerocopy/benches/try_transmute_ref_dynamic_size.x86-64.mca +49 -0
  172. data/rust-vendor/zerocopy/benches/try_transmute_ref_static_size.rs +17 -0
  173. data/rust-vendor/zerocopy/benches/try_transmute_ref_static_size.x86-64 +5 -0
  174. data/rust-vendor/zerocopy/benches/try_transmute_ref_static_size.x86-64.mca +47 -0
  175. data/rust-vendor/zerocopy/rustdoc/style.css +55 -0
  176. data/rust-vendor/zerocopy/src/lib.rs +331 -0
  177. data/rust-vendor/zerocopy/src/macros.rs +48 -1
  178. data/rust-vendor/zerocopy/src/util/macros.rs +199 -0
  179. data/rust-vendor/zerocopy/tests/codegen.rs +111 -0
  180. data/rust-vendor/zerocopy-derive/.cargo-checksum.json +1 -1
  181. data/rust-vendor/zerocopy-derive/.cargo_vcs_info.json +1 -1
  182. data/rust-vendor/zerocopy-derive/Cargo.lock +1 -1
  183. data/rust-vendor/zerocopy-derive/Cargo.toml +1 -1
  184. data/rust-vendor/zerocopy-derive/Cargo.toml.orig +1 -1
  185. metadata +137 -2
@@ -1790,6 +1790,29 @@ pub unsafe trait TryFromBytes {
1790
1790
  /// let bytes = &[0x10, 0xC0, 240, 77, 0, 1, 2, 3, 4, 5][..];
1791
1791
  /// assert!(Packet::try_ref_from_bytes(bytes).is_err());
1792
1792
  /// ```
1793
+ ///
1794
+ #[doc = codegen_section!(
1795
+ header = "h5",
1796
+ bench = "try_ref_from_bytes",
1797
+ format = "coco",
1798
+ arity = 3,
1799
+ [
1800
+ open
1801
+ @index 1
1802
+ @title "Sized"
1803
+ @variant "static_size"
1804
+ ],
1805
+ [
1806
+ @index 2
1807
+ @title "Unsized"
1808
+ @variant "dynamic_size"
1809
+ ],
1810
+ [
1811
+ @index 3
1812
+ @title "Dynamically Padded"
1813
+ @variant "dynamic_padding"
1814
+ ]
1815
+ )]
1793
1816
  #[must_use = "has no side effects"]
1794
1817
  #[inline]
1795
1818
  fn try_ref_from_bytes(source: &[u8]) -> Result<&Self, TryCastError<&[u8], Self>>
@@ -1889,6 +1912,29 @@ pub unsafe trait TryFromBytes {
1889
1912
  /// let bytes = &[0x10, 0xC0, 240, 77, 0, 1, 2, 3, 4, 5, 6][..];
1890
1913
  /// assert!(Packet::try_ref_from_prefix(bytes).is_err());
1891
1914
  /// ```
1915
+ ///
1916
+ #[doc = codegen_section!(
1917
+ header = "h5",
1918
+ bench = "try_ref_from_prefix",
1919
+ format = "coco",
1920
+ arity = 3,
1921
+ [
1922
+ open
1923
+ @index 1
1924
+ @title "Sized"
1925
+ @variant "static_size"
1926
+ ],
1927
+ [
1928
+ @index 2
1929
+ @title "Unsized"
1930
+ @variant "dynamic_size"
1931
+ ],
1932
+ [
1933
+ @index 3
1934
+ @title "Dynamically Padded"
1935
+ @variant "dynamic_padding"
1936
+ ]
1937
+ )]
1892
1938
  #[must_use = "has no side effects"]
1893
1939
  #[inline]
1894
1940
  fn try_ref_from_prefix(source: &[u8]) -> Result<(&Self, &[u8]), TryCastError<&[u8], Self>>
@@ -1975,6 +2021,29 @@ pub unsafe trait TryFromBytes {
1975
2021
  /// let bytes = &[0, 1, 2, 3, 4, 5, 6, 77, 240, 0xC0, 0x10][..];
1976
2022
  /// assert!(Packet::try_ref_from_suffix(bytes).is_err());
1977
2023
  /// ```
2024
+ ///
2025
+ #[doc = codegen_section!(
2026
+ header = "h5",
2027
+ bench = "try_ref_from_suffix",
2028
+ format = "coco",
2029
+ arity = 3,
2030
+ [
2031
+ open
2032
+ @index 1
2033
+ @title "Sized"
2034
+ @variant "static_size"
2035
+ ],
2036
+ [
2037
+ @index 2
2038
+ @title "Unsized"
2039
+ @variant "dynamic_size"
2040
+ ],
2041
+ [
2042
+ @index 3
2043
+ @title "Dynamically Padded"
2044
+ @variant "dynamic_padding"
2045
+ ]
2046
+ )]
1978
2047
  #[must_use = "has no side effects"]
1979
2048
  #[inline]
1980
2049
  fn try_ref_from_suffix(source: &[u8]) -> Result<(&[u8], &Self), TryCastError<&[u8], Self>>
@@ -2064,6 +2133,10 @@ pub unsafe trait TryFromBytes {
2064
2133
  /// let bytes = &mut [0x10, 0xC0, 240, 77, 0, 1, 2, 3, 4, 5, 6][..];
2065
2134
  /// assert!(Packet::try_mut_from_bytes(bytes).is_err());
2066
2135
  /// ```
2136
+ ///
2137
+ #[doc = codegen_header!("h5", "try_mut_from_bytes")]
2138
+ ///
2139
+ /// See [`TryFromBytes::try_ref_from_bytes`](#method.try_ref_from_bytes.codegen).
2067
2140
  #[must_use = "has no side effects"]
2068
2141
  #[inline]
2069
2142
  fn try_mut_from_bytes(bytes: &mut [u8]) -> Result<&mut Self, TryCastError<&mut [u8], Self>>
@@ -2168,6 +2241,10 @@ pub unsafe trait TryFromBytes {
2168
2241
  /// let bytes = &mut [0x10, 0xC0, 240, 77, 0, 1, 2, 3, 4, 5, 6][..];
2169
2242
  /// assert!(Packet::try_mut_from_prefix(bytes).is_err());
2170
2243
  /// ```
2244
+ ///
2245
+ #[doc = codegen_header!("h5", "try_mut_from_prefix")]
2246
+ ///
2247
+ /// See [`TryFromBytes::try_ref_from_prefix`](#method.try_ref_from_prefix.codegen).
2171
2248
  #[must_use = "has no side effects"]
2172
2249
  #[inline]
2173
2250
  fn try_mut_from_prefix(
@@ -2263,6 +2340,10 @@ pub unsafe trait TryFromBytes {
2263
2340
  /// let bytes = &mut [0, 1, 2, 3, 4, 5, 6, 77, 240, 0xC0, 0x10][..];
2264
2341
  /// assert!(Packet::try_mut_from_suffix(bytes).is_err());
2265
2342
  /// ```
2343
+ ///
2344
+ #[doc = codegen_header!("h5", "try_mut_from_suffix")]
2345
+ ///
2346
+ /// See [`TryFromBytes::try_ref_from_suffix`](#method.try_ref_from_suffix.codegen).
2266
2347
  #[must_use = "has no side effects"]
2267
2348
  #[inline]
2268
2349
  fn try_mut_from_suffix(
@@ -2349,6 +2430,24 @@ pub unsafe trait TryFromBytes {
2349
2430
  /// ```
2350
2431
  ///
2351
2432
  /// [`try_ref_from_bytes`]: TryFromBytes::try_ref_from_bytes
2433
+ ///
2434
+ #[doc = codegen_section!(
2435
+ header = "h5",
2436
+ bench = "try_ref_from_bytes_with_elems",
2437
+ format = "coco",
2438
+ arity = 2,
2439
+ [
2440
+ open
2441
+ @index 1
2442
+ @title "Unsized"
2443
+ @variant "dynamic_size"
2444
+ ],
2445
+ [
2446
+ @index 2
2447
+ @title "Dynamically Padded"
2448
+ @variant "dynamic_padding"
2449
+ ]
2450
+ )]
2352
2451
  #[must_use = "has no side effects"]
2353
2452
  #[inline]
2354
2453
  fn try_ref_from_bytes_with_elems(
@@ -2451,6 +2550,24 @@ pub unsafe trait TryFromBytes {
2451
2550
  /// ```
2452
2551
  ///
2453
2552
  /// [`try_ref_from_prefix`]: TryFromBytes::try_ref_from_prefix
2553
+ ///
2554
+ #[doc = codegen_section!(
2555
+ header = "h5",
2556
+ bench = "try_ref_from_prefix_with_elems",
2557
+ format = "coco",
2558
+ arity = 2,
2559
+ [
2560
+ open
2561
+ @index 1
2562
+ @title "Unsized"
2563
+ @variant "dynamic_size"
2564
+ ],
2565
+ [
2566
+ @index 2
2567
+ @title "Dynamically Padded"
2568
+ @variant "dynamic_padding"
2569
+ ]
2570
+ )]
2454
2571
  #[must_use = "has no side effects"]
2455
2572
  #[inline]
2456
2573
  fn try_ref_from_prefix_with_elems(
@@ -2540,6 +2657,24 @@ pub unsafe trait TryFromBytes {
2540
2657
  /// ```
2541
2658
  ///
2542
2659
  /// [`try_ref_from_prefix`]: TryFromBytes::try_ref_from_prefix
2660
+ ///
2661
+ #[doc = codegen_section!(
2662
+ header = "h5",
2663
+ bench = "try_ref_from_suffix_with_elems",
2664
+ format = "coco",
2665
+ arity = 2,
2666
+ [
2667
+ open
2668
+ @index 1
2669
+ @title "Unsized"
2670
+ @variant "dynamic_size"
2671
+ ],
2672
+ [
2673
+ @index 2
2674
+ @title "Dynamically Padded"
2675
+ @variant "dynamic_padding"
2676
+ ]
2677
+ )]
2543
2678
  #[must_use = "has no side effects"]
2544
2679
  #[inline]
2545
2680
  fn try_ref_from_suffix_with_elems(
@@ -2631,6 +2766,10 @@ pub unsafe trait TryFromBytes {
2631
2766
  /// ```
2632
2767
  ///
2633
2768
  /// [`try_mut_from_bytes`]: TryFromBytes::try_mut_from_bytes
2769
+ ///
2770
+ #[doc = codegen_header!("h5", "try_mut_from_bytes_with_elems")]
2771
+ ///
2772
+ /// See [`TryFromBytes::try_ref_from_bytes_with_elems`](#method.try_ref_from_bytes_with_elems.codegen).
2634
2773
  #[must_use = "has no side effects"]
2635
2774
  #[inline]
2636
2775
  fn try_mut_from_bytes_with_elems(
@@ -2737,6 +2876,10 @@ pub unsafe trait TryFromBytes {
2737
2876
  /// ```
2738
2877
  ///
2739
2878
  /// [`try_mut_from_prefix`]: TryFromBytes::try_mut_from_prefix
2879
+ ///
2880
+ #[doc = codegen_header!("h5", "try_mut_from_prefix_with_elems")]
2881
+ ///
2882
+ /// See [`TryFromBytes::try_ref_from_prefix_with_elems`](#method.try_ref_from_prefix_with_elems.codegen).
2740
2883
  #[must_use = "has no side effects"]
2741
2884
  #[inline]
2742
2885
  fn try_mut_from_prefix_with_elems(
@@ -2832,6 +2975,10 @@ pub unsafe trait TryFromBytes {
2832
2975
  /// ```
2833
2976
  ///
2834
2977
  /// [`try_mut_from_prefix`]: TryFromBytes::try_mut_from_prefix
2978
+ ///
2979
+ #[doc = codegen_header!("h5", "try_mut_from_suffix_with_elems")]
2980
+ ///
2981
+ /// See [`TryFromBytes::try_ref_from_suffix_with_elems`](#method.try_ref_from_suffix_with_elems.codegen).
2835
2982
  #[must_use = "has no side effects"]
2836
2983
  #[inline]
2837
2984
  fn try_mut_from_suffix_with_elems(
@@ -2892,6 +3039,12 @@ pub unsafe trait TryFromBytes {
2892
3039
  /// is a valid `Self`. This ensures that validation can be performed using
2893
3040
  /// aligned reads (which carry a performance advantage over unaligned reads
2894
3041
  /// on many platforms) at the cost of an unconditional copy.
3042
+ ///
3043
+ #[doc = codegen_section!(
3044
+ header = "h5",
3045
+ bench = "try_read_from_bytes",
3046
+ format = "coco_static_size",
3047
+ )]
2895
3048
  #[must_use = "has no side effects"]
2896
3049
  #[inline]
2897
3050
  fn try_read_from_bytes(source: &[u8]) -> Result<Self, TryReadError<&[u8], Self>>
@@ -2963,6 +3116,12 @@ pub unsafe trait TryFromBytes {
2963
3116
  /// is a valid `Self`. This ensures that validation can be performed using
2964
3117
  /// aligned reads (which carry a performance advantage over unaligned reads
2965
3118
  /// on many platforms) at the cost of an unconditional copy.
3119
+ ///
3120
+ #[doc = codegen_section!(
3121
+ header = "h5",
3122
+ bench = "try_read_from_prefix",
3123
+ format = "coco_static_size",
3124
+ )]
2966
3125
  #[must_use = "has no side effects"]
2967
3126
  #[inline]
2968
3127
  fn try_read_from_prefix(source: &[u8]) -> Result<(Self, &[u8]), TryReadError<&[u8], Self>>
@@ -3035,6 +3194,12 @@ pub unsafe trait TryFromBytes {
3035
3194
  /// is a valid `Self`. This ensures that validation can be performed using
3036
3195
  /// aligned reads (which carry a performance advantage over unaligned reads
3037
3196
  /// on many platforms) at the cost of an unconditional copy.
3197
+ ///
3198
+ #[doc = codegen_section!(
3199
+ header = "h5",
3200
+ bench = "try_read_from_suffix",
3201
+ format = "coco_static_size",
3202
+ )]
3038
3203
  #[must_use = "has no side effects"]
3039
3204
  #[inline]
3040
3205
  fn try_read_from_suffix(source: &[u8]) -> Result<(&[u8], Self), TryReadError<&[u8], Self>>
@@ -3816,6 +3981,29 @@ pub unsafe trait FromBytes: FromZeros {
3816
3981
  /// assert_eq!(packet.header.checksum, [6, 7]);
3817
3982
  /// assert_eq!(packet.body, [8, 9, 10, 11]);
3818
3983
  /// ```
3984
+ ///
3985
+ #[doc = codegen_section!(
3986
+ header = "h5",
3987
+ bench = "ref_from_bytes",
3988
+ format = "coco",
3989
+ arity = 3,
3990
+ [
3991
+ open
3992
+ @index 1
3993
+ @title "Sized"
3994
+ @variant "static_size"
3995
+ ],
3996
+ [
3997
+ @index 2
3998
+ @title "Unsized"
3999
+ @variant "dynamic_size"
4000
+ ],
4001
+ [
4002
+ @index 3
4003
+ @title "Dynamically Padded"
4004
+ @variant "dynamic_padding"
4005
+ ]
4006
+ )]
3819
4007
  #[must_use = "has no side effects"]
3820
4008
  #[inline]
3821
4009
  fn ref_from_bytes(source: &[u8]) -> Result<&Self, CastError<&[u8], Self>>
@@ -3904,6 +4092,29 @@ pub unsafe trait FromBytes: FromZeros {
3904
4092
  /// assert_eq!(packet.body, [[8, 9], [10, 11], [12, 13]]);
3905
4093
  /// assert_eq!(suffix, &[14u8][..]);
3906
4094
  /// ```
4095
+ ///
4096
+ #[doc = codegen_section!(
4097
+ header = "h5",
4098
+ bench = "ref_from_prefix",
4099
+ format = "coco",
4100
+ arity = 3,
4101
+ [
4102
+ open
4103
+ @index 1
4104
+ @title "Sized"
4105
+ @variant "static_size"
4106
+ ],
4107
+ [
4108
+ @index 2
4109
+ @title "Unsized"
4110
+ @variant "dynamic_size"
4111
+ ],
4112
+ [
4113
+ @index 3
4114
+ @title "Dynamically Padded"
4115
+ @variant "dynamic_padding"
4116
+ ]
4117
+ )]
3907
4118
  #[must_use = "has no side effects"]
3908
4119
  #[inline]
3909
4120
  fn ref_from_prefix(source: &[u8]) -> Result<(&Self, &[u8]), CastError<&[u8], Self>>
@@ -3974,6 +4185,29 @@ pub unsafe trait FromBytes: FromZeros {
3974
4185
  /// assert_eq!(prefix, &[0, 1, 2, 3, 4, 5][..]);
3975
4186
  /// assert_eq!(trailer.frame_check_sequence, [6, 7, 8, 9]);
3976
4187
  /// ```
4188
+ ///
4189
+ #[doc = codegen_section!(
4190
+ header = "h5",
4191
+ bench = "ref_from_suffix",
4192
+ format = "coco",
4193
+ arity = 3,
4194
+ [
4195
+ open
4196
+ @index 1
4197
+ @title "Sized"
4198
+ @variant "static_size"
4199
+ ],
4200
+ [
4201
+ @index 2
4202
+ @title "Unsized"
4203
+ @variant "dynamic_size"
4204
+ ],
4205
+ [
4206
+ @index 3
4207
+ @title "Dynamically Padded"
4208
+ @variant "dynamic_padding"
4209
+ ]
4210
+ )]
3977
4211
  #[must_use = "has no side effects"]
3978
4212
  #[inline]
3979
4213
  fn ref_from_suffix(source: &[u8]) -> Result<(&[u8], &Self), CastError<&[u8], Self>>
@@ -4051,7 +4285,12 @@ pub unsafe trait FromBytes: FromZeros {
4051
4285
  /// header.checksum = [0, 0];
4052
4286
  ///
4053
4287
  /// assert_eq!(bytes, [0, 1, 2, 3, 4, 5, 0, 0]);
4288
+ ///
4054
4289
  /// ```
4290
+ ///
4291
+ #[doc = codegen_header!("h5", "mut_from_bytes")]
4292
+ ///
4293
+ /// See [`FromBytes::ref_from_bytes`](#method.ref_from_bytes.codegen).
4055
4294
  #[must_use = "has no side effects"]
4056
4295
  #[inline]
4057
4296
  fn mut_from_bytes(source: &mut [u8]) -> Result<&mut Self, CastError<&mut [u8], Self>>
@@ -4138,6 +4377,10 @@ pub unsafe trait FromBytes: FromZeros {
4138
4377
  ///
4139
4378
  /// assert_eq!(bytes, [0, 1, 2, 3, 4, 5, 0, 0, 1, 1]);
4140
4379
  /// ```
4380
+ ///
4381
+ #[doc = codegen_header!("h5", "mut_from_prefix")]
4382
+ ///
4383
+ /// See [`FromBytes::ref_from_prefix`](#method.ref_from_prefix.codegen).
4141
4384
  #[must_use = "has no side effects"]
4142
4385
  #[inline]
4143
4386
  fn mut_from_prefix(
@@ -4214,6 +4457,10 @@ pub unsafe trait FromBytes: FromZeros {
4214
4457
  ///
4215
4458
  /// assert_eq!(bytes, [0, 0, 0, 0, 0, 0, 1, 1, 1, 1]);
4216
4459
  /// ```
4460
+ ///
4461
+ #[doc = codegen_header!("h5", "mut_from_suffix")]
4462
+ ///
4463
+ /// See [`FromBytes::ref_from_suffix`](#method.ref_from_suffix.codegen).
4217
4464
  #[must_use = "has no side effects"]
4218
4465
  #[inline]
4219
4466
  fn mut_from_suffix(
@@ -4287,6 +4534,24 @@ pub unsafe trait FromBytes: FromZeros {
4287
4534
  /// ```
4288
4535
  ///
4289
4536
  /// [`ref_from_bytes`]: FromBytes::ref_from_bytes
4537
+ ///
4538
+ #[doc = codegen_section!(
4539
+ header = "h5",
4540
+ bench = "ref_from_bytes_with_elems",
4541
+ format = "coco",
4542
+ arity = 2,
4543
+ [
4544
+ open
4545
+ @index 1
4546
+ @title "Unsized"
4547
+ @variant "dynamic_size"
4548
+ ],
4549
+ [
4550
+ @index 2
4551
+ @title "Dynamically Padded"
4552
+ @variant "dynamic_padding"
4553
+ ]
4554
+ )]
4290
4555
  #[must_use = "has no side effects"]
4291
4556
  #[inline]
4292
4557
  fn ref_from_bytes_with_elems(
@@ -4367,6 +4632,24 @@ pub unsafe trait FromBytes: FromZeros {
4367
4632
  /// ```
4368
4633
  ///
4369
4634
  /// [`ref_from_prefix`]: FromBytes::ref_from_prefix
4635
+ ///
4636
+ #[doc = codegen_section!(
4637
+ header = "h5",
4638
+ bench = "ref_from_prefix_with_elems",
4639
+ format = "coco",
4640
+ arity = 2,
4641
+ [
4642
+ open
4643
+ @index 1
4644
+ @title "Unsized"
4645
+ @variant "dynamic_size"
4646
+ ],
4647
+ [
4648
+ @index 2
4649
+ @title "Dynamically Padded"
4650
+ @variant "dynamic_padding"
4651
+ ]
4652
+ )]
4370
4653
  #[must_use = "has no side effects"]
4371
4654
  #[inline]
4372
4655
  fn ref_from_prefix_with_elems(
@@ -4442,6 +4725,24 @@ pub unsafe trait FromBytes: FromZeros {
4442
4725
  /// ```
4443
4726
  ///
4444
4727
  /// [`ref_from_suffix`]: FromBytes::ref_from_suffix
4728
+ ///
4729
+ #[doc = codegen_section!(
4730
+ header = "h5",
4731
+ bench = "ref_from_suffix_with_elems",
4732
+ format = "coco",
4733
+ arity = 2,
4734
+ [
4735
+ open
4736
+ @index 1
4737
+ @title "Unsized"
4738
+ @variant "dynamic_size"
4739
+ ],
4740
+ [
4741
+ @index 2
4742
+ @title "Dynamically Padded"
4743
+ @variant "dynamic_padding"
4744
+ ]
4745
+ )]
4445
4746
  #[must_use = "has no side effects"]
4446
4747
  #[inline]
4447
4748
  fn ref_from_suffix_with_elems(
@@ -4518,6 +4819,10 @@ pub unsafe trait FromBytes: FromZeros {
4518
4819
  /// ```
4519
4820
  ///
4520
4821
  /// [`mut_from_bytes`]: FromBytes::mut_from_bytes
4822
+ ///
4823
+ #[doc = codegen_header!("h5", "mut_from_bytes_with_elems")]
4824
+ ///
4825
+ /// See [`TryFromBytes::ref_from_bytes_with_elems`](#method.ref_from_bytes_with_elems.codegen).
4521
4826
  #[must_use = "has no side effects"]
4522
4827
  #[inline]
4523
4828
  fn mut_from_bytes_with_elems(
@@ -4603,6 +4908,10 @@ pub unsafe trait FromBytes: FromZeros {
4603
4908
  /// ```
4604
4909
  ///
4605
4910
  /// [`mut_from_prefix`]: FromBytes::mut_from_prefix
4911
+ ///
4912
+ #[doc = codegen_header!("h5", "mut_from_prefix_with_elems")]
4913
+ ///
4914
+ /// See [`TryFromBytes::ref_from_prefix_with_elems`](#method.ref_from_prefix_with_elems.codegen).
4606
4915
  #[must_use = "has no side effects"]
4607
4916
  #[inline]
4608
4917
  fn mut_from_prefix_with_elems(
@@ -4683,6 +4992,10 @@ pub unsafe trait FromBytes: FromZeros {
4683
4992
  /// ```
4684
4993
  ///
4685
4994
  /// [`mut_from_suffix`]: FromBytes::mut_from_suffix
4995
+ ///
4996
+ #[doc = codegen_header!("h5", "mut_from_suffix_with_elems")]
4997
+ ///
4998
+ /// See [`TryFromBytes::ref_from_suffix_with_elems`](#method.ref_from_suffix_with_elems.codegen).
4686
4999
  #[must_use = "has no side effects"]
4687
5000
  #[inline]
4688
5001
  fn mut_from_suffix_with_elems(
@@ -4724,6 +5037,12 @@ pub unsafe trait FromBytes: FromZeros {
4724
5037
  /// assert_eq!(header.length, [4, 5]);
4725
5038
  /// assert_eq!(header.checksum, [6, 7]);
4726
5039
  /// ```
5040
+ ///
5041
+ #[doc = codegen_section!(
5042
+ header = "h5",
5043
+ bench = "read_from_bytes",
5044
+ format = "coco_static_size",
5045
+ )]
4727
5046
  #[must_use = "has no side effects"]
4728
5047
  #[inline]
4729
5048
  fn read_from_bytes(source: &[u8]) -> Result<Self, SizeError<&[u8], Self>>
@@ -4775,6 +5094,12 @@ pub unsafe trait FromBytes: FromZeros {
4775
5094
  /// assert_eq!(header.checksum, [6, 7]);
4776
5095
  /// assert_eq!(body, [8, 9]);
4777
5096
  /// ```
5097
+ ///
5098
+ #[doc = codegen_section!(
5099
+ header = "h5",
5100
+ bench = "read_from_prefix",
5101
+ format = "coco_static_size",
5102
+ )]
4778
5103
  #[must_use = "has no side effects"]
4779
5104
  #[inline]
4780
5105
  fn read_from_prefix(source: &[u8]) -> Result<(Self, &[u8]), SizeError<&[u8], Self>>
@@ -4820,6 +5145,12 @@ pub unsafe trait FromBytes: FromZeros {
4820
5145
  /// assert_eq!(prefix, [0, 1, 2, 3, 4, 5]);
4821
5146
  /// assert_eq!(trailer.frame_check_sequence, [6, 7, 8, 9]);
4822
5147
  /// ```
5148
+ ///
5149
+ #[doc = codegen_section!(
5150
+ header = "h5",
5151
+ bench = "read_from_suffix",
5152
+ format = "coco_static_size",
5153
+ )]
4823
5154
  #[must_use = "has no side effects"]
4824
5155
  #[inline]
4825
5156
  fn read_from_suffix(source: &[u8]) -> Result<(&[u8], Self), SizeError<&[u8], Self>>
@@ -60,6 +60,12 @@
60
60
  /// # Use in `const` contexts
61
61
  ///
62
62
  /// This macro can be invoked in `const` contexts.
63
+ ///
64
+ #[doc = codegen_section!(
65
+ header = "h2",
66
+ bench = "transmute",
67
+ format = "coco_static_size",
68
+ )]
63
69
  #[macro_export]
64
70
  macro_rules! transmute {
65
71
  // NOTE: This must be a macro (rather than a function with trait bounds)
@@ -312,6 +318,24 @@ macro_rules! transmute {
312
318
  ///
313
319
  /// This macro can be invoked in `const` contexts only when `Src: Sized` and
314
320
  /// `Dst: Sized`.
321
+ ///
322
+ #[doc = codegen_section!(
323
+ header = "h2",
324
+ bench = "transmute_ref",
325
+ format = "coco",
326
+ arity = 2,
327
+ [
328
+ open
329
+ @index 1
330
+ @title "Sized"
331
+ @variant "static_size"
332
+ ],
333
+ [
334
+ @index 2
335
+ @title "Unsized"
336
+ @variant "dynamic_size"
337
+ ]
338
+ )]
315
339
  #[macro_export]
316
340
  macro_rules! transmute_ref {
317
341
  ($e:expr) => {{
@@ -508,7 +532,6 @@ macro_rules! transmute_ref {
508
532
  /// assert_eq!(src.t.as_bytes(), [0, 1, 2, 3]);
509
533
  /// assert_eq!(src.u.len(), 2);
510
534
  /// assert_eq!(src.u.as_bytes(), [4, 5, 6, 7]);
511
- ///
512
535
  /// ```
513
536
  #[macro_export]
514
537
  macro_rules! transmute_mut {
@@ -593,6 +616,12 @@ macro_rules! transmute_mut {
593
616
  /// Result::<bool, _>::Err(ValidityError { .. })
594
617
  /// ));
595
618
  /// ```
619
+ ///
620
+ #[doc = codegen_section!(
621
+ header = "h2",
622
+ bench = "try_transmute",
623
+ format = "coco_static_size",
624
+ )]
596
625
  #[macro_export]
597
626
  macro_rules! try_transmute {
598
627
  ($e:expr) => {{
@@ -714,6 +743,24 @@ macro_rules! try_transmute {
714
743
  /// assert_eq!(dst.t.as_bytes(), [0, 1]);
715
744
  /// assert_eq!(dst.u, [false, true, false, true, false, true]);
716
745
  /// ```
746
+ ///
747
+ #[doc = codegen_section!(
748
+ header = "h2",
749
+ bench = "try_transmute_ref",
750
+ format = "coco",
751
+ arity = 2,
752
+ [
753
+ open
754
+ @index 1
755
+ @title "Sized"
756
+ @variant "static_size"
757
+ ],
758
+ [
759
+ @index 2
760
+ @title "Unsized"
761
+ @variant "dynamic_size"
762
+ ]
763
+ )]
717
764
  #[macro_export]
718
765
  macro_rules! try_transmute_ref {
719
766
  ($e:expr) => {{