html-to-markdown 2.25.1 → 2.26.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 (2075) hide show
  1. checksums.yaml +4 -4
  2. data/Cargo.toml +3 -0
  3. data/Gemfile.lock +2 -2
  4. data/README.md +8 -5
  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/anyhow/.cargo-checksum.json +1 -1
  8. data/rust-vendor/anyhow/.cargo_vcs_info.json +1 -1
  9. data/rust-vendor/anyhow/.github/workflows/ci.yml +3 -4
  10. data/rust-vendor/anyhow/Cargo.lock +31 -111
  11. data/rust-vendor/anyhow/Cargo.toml +2 -5
  12. data/rust-vendor/anyhow/Cargo.toml.orig +4 -8
  13. data/rust-vendor/anyhow/build.rs +1 -14
  14. data/rust-vendor/anyhow/src/backtrace.rs +8 -370
  15. data/rust-vendor/anyhow/src/error.rs +12 -39
  16. data/rust-vendor/anyhow/src/fmt.rs +2 -2
  17. data/rust-vendor/anyhow/src/lib.rs +1 -1
  18. data/rust-vendor/async-trait/.cargo-checksum.json +1 -0
  19. data/rust-vendor/async-trait/.cargo_vcs_info.json +6 -0
  20. data/rust-vendor/async-trait/.github/FUNDING.yml +1 -0
  21. data/rust-vendor/async-trait/.github/workflows/ci.yml +109 -0
  22. data/rust-vendor/async-trait/Cargo.lock +453 -0
  23. data/rust-vendor/async-trait/Cargo.toml +91 -0
  24. data/rust-vendor/async-trait/Cargo.toml.orig +38 -0
  25. data/rust-vendor/async-trait/LICENSE-APACHE +176 -0
  26. data/rust-vendor/async-trait/README.md +205 -0
  27. data/rust-vendor/async-trait/src/args.rs +36 -0
  28. data/rust-vendor/async-trait/src/bound.rs +50 -0
  29. data/rust-vendor/async-trait/src/expand.rs +504 -0
  30. data/rust-vendor/async-trait/src/lib.rs +257 -0
  31. data/rust-vendor/async-trait/src/lifetime.rs +112 -0
  32. data/rust-vendor/async-trait/src/parse.rs +34 -0
  33. data/rust-vendor/async-trait/src/receiver.rs +169 -0
  34. data/rust-vendor/async-trait/src/verbatim.rs +34 -0
  35. data/rust-vendor/async-trait/tests/compiletest.rs +7 -0
  36. data/rust-vendor/async-trait/tests/executor/mod.rs +36 -0
  37. data/rust-vendor/async-trait/tests/test.rs +1728 -0
  38. data/rust-vendor/async-trait/tests/ui/arg-implementation-detail.rs +22 -0
  39. data/rust-vendor/async-trait/tests/ui/arg-implementation-detail.stderr +5 -0
  40. data/rust-vendor/async-trait/tests/ui/bare-trait-object.rs +15 -0
  41. data/rust-vendor/async-trait/tests/ui/bare-trait-object.stderr +15 -0
  42. data/rust-vendor/async-trait/tests/ui/consider-restricting.rs +26 -0
  43. data/rust-vendor/async-trait/tests/ui/consider-restricting.stderr +33 -0
  44. data/rust-vendor/async-trait/tests/ui/delimiter-span.rs +24 -0
  45. data/rust-vendor/async-trait/tests/ui/delimiter-span.stderr +21 -0
  46. data/rust-vendor/async-trait/tests/ui/lifetime-defined-here.rs +23 -0
  47. data/rust-vendor/async-trait/tests/ui/lifetime-defined-here.stderr +29 -0
  48. data/rust-vendor/async-trait/tests/ui/lifetime-span.rs +36 -0
  49. data/rust-vendor/async-trait/tests/ui/lifetime-span.stderr +33 -0
  50. data/rust-vendor/async-trait/tests/ui/missing-async-in-impl.rs +15 -0
  51. data/rust-vendor/async-trait/tests/ui/missing-async-in-impl.stderr +8 -0
  52. data/rust-vendor/async-trait/tests/ui/missing-async-in-trait.rs +15 -0
  53. data/rust-vendor/async-trait/tests/ui/missing-async-in-trait.stderr +8 -0
  54. data/rust-vendor/async-trait/tests/ui/missing-body.rs +15 -0
  55. data/rust-vendor/async-trait/tests/ui/missing-body.stderr +7 -0
  56. data/rust-vendor/async-trait/tests/ui/must-use.rs +21 -0
  57. data/rust-vendor/async-trait/tests/ui/must-use.stderr +23 -0
  58. data/rust-vendor/async-trait/tests/ui/no-attribute-macro.rs +13 -0
  59. data/rust-vendor/async-trait/tests/ui/no-attribute-macro.stderr +17 -0
  60. data/rust-vendor/async-trait/tests/ui/self-span.rs +30 -0
  61. data/rust-vendor/async-trait/tests/ui/self-span.stderr +32 -0
  62. data/rust-vendor/async-trait/tests/ui/send-not-implemented.rs +22 -0
  63. data/rust-vendor/async-trait/tests/ui/send-not-implemented.stderr +31 -0
  64. data/rust-vendor/async-trait/tests/ui/type-mismatch.rs +21 -0
  65. data/rust-vendor/async-trait/tests/ui/type-mismatch.stderr +11 -0
  66. data/rust-vendor/async-trait/tests/ui/unreachable.rs +20 -0
  67. data/rust-vendor/async-trait/tests/ui/unreachable.stderr +14 -0
  68. data/rust-vendor/async-trait/tests/ui/unsupported-self.rs +15 -0
  69. data/rust-vendor/async-trait/tests/ui/unsupported-self.stderr +5 -0
  70. data/rust-vendor/bumpalo/.cargo-checksum.json +1 -1
  71. data/rust-vendor/bumpalo/.cargo_vcs_info.json +1 -1
  72. data/rust-vendor/bumpalo/CHANGELOG.md +39 -0
  73. data/rust-vendor/bumpalo/Cargo.lock +1 -1
  74. data/rust-vendor/bumpalo/Cargo.toml +2 -2
  75. data/rust-vendor/bumpalo/Cargo.toml.orig +2 -2
  76. data/rust-vendor/bumpalo/src/boxed.rs +73 -25
  77. data/rust-vendor/bumpalo/src/collections/string.rs +41 -19
  78. data/rust-vendor/bumpalo/src/collections/vec.rs +27 -0
  79. data/rust-vendor/bumpalo/src/lib.rs +11 -0
  80. data/rust-vendor/futures/.cargo-checksum.json +1 -0
  81. data/rust-vendor/futures/.cargo_vcs_info.json +6 -0
  82. data/rust-vendor/futures/Cargo.lock +746 -0
  83. data/rust-vendor/futures/Cargo.toml +394 -0
  84. data/rust-vendor/futures/Cargo.toml.orig +65 -0
  85. data/rust-vendor/futures/LICENSE-APACHE +202 -0
  86. data/rust-vendor/futures/LICENSE-MIT +26 -0
  87. data/rust-vendor/futures/README.md +61 -0
  88. data/rust-vendor/futures/src/lib.rs +254 -0
  89. data/rust-vendor/futures/tests/_require_features.rs +13 -0
  90. data/rust-vendor/futures/tests/async_await_macros.rs +404 -0
  91. data/rust-vendor/futures/tests/auto_traits.rs +1899 -0
  92. data/rust-vendor/futures/tests/bilock.rs +104 -0
  93. data/rust-vendor/futures/tests/compat.rs +16 -0
  94. data/rust-vendor/futures/tests/eager_drop.rs +121 -0
  95. data/rust-vendor/futures/tests/eventual.rs +179 -0
  96. data/rust-vendor/futures/tests/future_abortable.rs +44 -0
  97. data/rust-vendor/futures/tests/future_basic_combinators.rs +104 -0
  98. data/rust-vendor/futures/tests/future_fuse.rs +12 -0
  99. data/rust-vendor/futures/tests/future_inspect.rs +16 -0
  100. data/rust-vendor/futures/tests/future_join.rs +32 -0
  101. data/rust-vendor/futures/tests/future_join_all.rs +40 -0
  102. data/rust-vendor/futures/tests/future_obj.rs +33 -0
  103. data/rust-vendor/futures/tests/future_select_all.rs +25 -0
  104. data/rust-vendor/futures/tests/future_select_ok.rs +30 -0
  105. data/rust-vendor/futures/tests/future_shared.rs +273 -0
  106. data/rust-vendor/futures/tests/future_try_flatten_stream.rs +83 -0
  107. data/rust-vendor/futures/tests/future_try_join_all.rs +44 -0
  108. data/rust-vendor/futures/tests/io_buf_reader.rs +431 -0
  109. data/rust-vendor/futures/tests/io_buf_writer.rs +239 -0
  110. data/rust-vendor/futures/tests/io_cursor.rs +30 -0
  111. data/rust-vendor/futures/tests/io_line_writer.rs +73 -0
  112. data/rust-vendor/futures/tests/io_lines.rs +84 -0
  113. data/rust-vendor/futures/tests/io_read.rs +64 -0
  114. data/rust-vendor/futures/tests/io_read_exact.rs +17 -0
  115. data/rust-vendor/futures/tests/io_read_line.rs +101 -0
  116. data/rust-vendor/futures/tests/io_read_to_end.rs +65 -0
  117. data/rust-vendor/futures/tests/io_read_to_string.rs +44 -0
  118. data/rust-vendor/futures/tests/io_read_until.rs +60 -0
  119. data/rust-vendor/futures/tests/io_window.rs +30 -0
  120. data/rust-vendor/futures/tests/io_write.rs +65 -0
  121. data/rust-vendor/futures/tests/lock_mutex.rs +69 -0
  122. data/rust-vendor/futures/tests/macro_comma_support.rs +43 -0
  123. data/rust-vendor/futures/tests/object_safety.rs +49 -0
  124. data/rust-vendor/futures/tests/oneshot.rs +78 -0
  125. data/rust-vendor/futures/tests/ready_queue.rs +148 -0
  126. data/rust-vendor/futures/tests/recurse.rs +25 -0
  127. data/rust-vendor/futures/tests/sink.rs +554 -0
  128. data/rust-vendor/futures/tests/sink_fanout.rs +24 -0
  129. data/rust-vendor/futures/tests/stream.rs +577 -0
  130. data/rust-vendor/futures/tests/stream_abortable.rs +46 -0
  131. data/rust-vendor/futures/tests/stream_buffer_unordered.rs +73 -0
  132. data/rust-vendor/futures/tests/stream_catch_unwind.rs +27 -0
  133. data/rust-vendor/futures/tests/stream_futures_ordered.rs +172 -0
  134. data/rust-vendor/futures/tests/stream_futures_unordered.rs +431 -0
  135. data/rust-vendor/futures/tests/stream_into_async_read.rs +94 -0
  136. data/rust-vendor/futures/tests/stream_peekable.rs +58 -0
  137. data/rust-vendor/futures/tests/stream_select_all.rs +197 -0
  138. data/rust-vendor/futures/tests/stream_select_next_some.rs +86 -0
  139. data/rust-vendor/futures/tests/stream_split.rs +57 -0
  140. data/rust-vendor/futures/tests/stream_try_stream.rs +183 -0
  141. data/rust-vendor/futures/tests/stream_unfold.rs +32 -0
  142. data/rust-vendor/futures/tests/task_arc_wake.rs +79 -0
  143. data/rust-vendor/futures/tests/task_atomic_waker.rs +48 -0
  144. data/rust-vendor/futures/tests/test_macro.rs +20 -0
  145. data/rust-vendor/futures/tests/try_join.rs +35 -0
  146. data/rust-vendor/futures/tests_disabled/all.rs +400 -0
  147. data/rust-vendor/futures/tests_disabled/stream.rs +368 -0
  148. data/rust-vendor/futures-channel/.cargo-checksum.json +1 -0
  149. data/rust-vendor/futures-channel/.cargo_vcs_info.json +6 -0
  150. data/rust-vendor/futures-channel/Cargo.lock +23 -0
  151. data/rust-vendor/futures-channel/Cargo.toml +97 -0
  152. data/rust-vendor/futures-channel/Cargo.toml.orig +38 -0
  153. data/rust-vendor/futures-channel/LICENSE-APACHE +202 -0
  154. data/rust-vendor/futures-channel/LICENSE-MIT +26 -0
  155. data/rust-vendor/futures-channel/README.md +23 -0
  156. data/rust-vendor/futures-channel/benches/sync_mpsc.rs +135 -0
  157. data/rust-vendor/futures-channel/src/lib.rs +38 -0
  158. data/rust-vendor/futures-channel/src/lock.rs +102 -0
  159. data/rust-vendor/futures-channel/src/mpsc/mod.rs +1468 -0
  160. data/rust-vendor/futures-channel/src/mpsc/queue.rs +177 -0
  161. data/rust-vendor/futures-channel/src/mpsc/sink_impl.rs +73 -0
  162. data/rust-vendor/futures-channel/src/oneshot.rs +488 -0
  163. data/rust-vendor/futures-channel/tests/channel.rs +66 -0
  164. data/rust-vendor/futures-channel/tests/mpsc-close.rs +332 -0
  165. data/rust-vendor/futures-channel/tests/mpsc-size_hint.rs +40 -0
  166. data/rust-vendor/futures-channel/tests/mpsc.rs +703 -0
  167. data/rust-vendor/futures-channel/tests/oneshot.rs +256 -0
  168. data/rust-vendor/futures-core/.cargo-checksum.json +1 -0
  169. data/rust-vendor/futures-core/.cargo_vcs_info.json +6 -0
  170. data/rust-vendor/futures-core/Cargo.lock +16 -0
  171. data/rust-vendor/futures-core/Cargo.toml +66 -0
  172. data/rust-vendor/futures-core/Cargo.toml.orig +35 -0
  173. data/rust-vendor/futures-core/LICENSE-APACHE +202 -0
  174. data/rust-vendor/futures-core/LICENSE-MIT +26 -0
  175. data/rust-vendor/futures-core/README.md +23 -0
  176. data/rust-vendor/futures-core/src/future.rs +113 -0
  177. data/rust-vendor/futures-core/src/lib.rs +27 -0
  178. data/rust-vendor/futures-core/src/stream.rs +245 -0
  179. data/rust-vendor/futures-core/src/task/__internal/atomic_waker.rs +423 -0
  180. data/rust-vendor/futures-core/src/task/__internal/mod.rs +7 -0
  181. data/rust-vendor/futures-core/src/task/mod.rs +10 -0
  182. data/rust-vendor/futures-core/src/task/poll.rs +15 -0
  183. data/rust-vendor/futures-executor/.cargo-checksum.json +1 -0
  184. data/rust-vendor/futures-executor/.cargo_vcs_info.json +6 -0
  185. data/rust-vendor/futures-executor/Cargo.lock +48 -0
  186. data/rust-vendor/futures-executor/Cargo.toml +82 -0
  187. data/rust-vendor/futures-executor/Cargo.toml.orig +32 -0
  188. data/rust-vendor/futures-executor/LICENSE-APACHE +202 -0
  189. data/rust-vendor/futures-executor/LICENSE-MIT +26 -0
  190. data/rust-vendor/futures-executor/README.md +23 -0
  191. data/rust-vendor/futures-executor/benches/thread_notify.rs +109 -0
  192. data/rust-vendor/futures-executor/src/enter.rs +80 -0
  193. data/rust-vendor/futures-executor/src/lib.rs +73 -0
  194. data/rust-vendor/futures-executor/src/local_pool.rs +401 -0
  195. data/rust-vendor/futures-executor/src/thread_pool.rs +377 -0
  196. data/rust-vendor/futures-executor/src/unpark_mutex.rs +137 -0
  197. data/rust-vendor/futures-executor/tests/local_pool.rs +497 -0
  198. data/rust-vendor/futures-io/.cargo-checksum.json +1 -0
  199. data/rust-vendor/futures-io/.cargo_vcs_info.json +6 -0
  200. data/rust-vendor/futures-io/Cargo.lock +6 -0
  201. data/rust-vendor/futures-io/Cargo.toml +58 -0
  202. data/rust-vendor/futures-io/Cargo.toml.orig +30 -0
  203. data/rust-vendor/futures-io/LICENSE-APACHE +202 -0
  204. data/rust-vendor/futures-io/LICENSE-MIT +26 -0
  205. data/rust-vendor/futures-io/README.md +23 -0
  206. data/rust-vendor/futures-io/src/lib.rs +561 -0
  207. data/rust-vendor/futures-macro/.cargo-checksum.json +1 -0
  208. data/rust-vendor/futures-macro/.cargo_vcs_info.json +6 -0
  209. data/rust-vendor/futures-macro/Cargo.lock +47 -0
  210. data/rust-vendor/futures-macro/Cargo.toml +57 -0
  211. data/rust-vendor/futures-macro/Cargo.toml.orig +25 -0
  212. data/rust-vendor/futures-macro/LICENSE-APACHE +202 -0
  213. data/rust-vendor/futures-macro/LICENSE-MIT +26 -0
  214. data/rust-vendor/futures-macro/src/executor.rs +56 -0
  215. data/rust-vendor/futures-macro/src/join.rs +144 -0
  216. data/rust-vendor/futures-macro/src/lib.rs +55 -0
  217. data/rust-vendor/futures-macro/src/select.rs +330 -0
  218. data/rust-vendor/futures-macro/src/stream_select.rs +113 -0
  219. data/rust-vendor/futures-sink/.cargo-checksum.json +1 -0
  220. data/rust-vendor/futures-sink/.cargo_vcs_info.json +6 -0
  221. data/rust-vendor/futures-sink/Cargo.lock +6 -0
  222. data/rust-vendor/futures-sink/Cargo.toml +54 -0
  223. data/rust-vendor/futures-sink/Cargo.toml.orig +25 -0
  224. data/rust-vendor/futures-sink/LICENSE-APACHE +202 -0
  225. data/rust-vendor/futures-sink/LICENSE-MIT +26 -0
  226. data/rust-vendor/futures-sink/README.md +23 -0
  227. data/rust-vendor/futures-sink/src/lib.rs +240 -0
  228. data/rust-vendor/futures-task/.cargo-checksum.json +1 -0
  229. data/rust-vendor/futures-task/.cargo_vcs_info.json +6 -0
  230. data/rust-vendor/futures-task/Cargo.lock +6 -0
  231. data/rust-vendor/futures-task/Cargo.toml +58 -0
  232. data/rust-vendor/futures-task/Cargo.toml.orig +33 -0
  233. data/rust-vendor/futures-task/LICENSE-APACHE +202 -0
  234. data/rust-vendor/futures-task/LICENSE-MIT +26 -0
  235. data/rust-vendor/futures-task/README.md +23 -0
  236. data/rust-vendor/futures-task/src/arc_wake.rs +49 -0
  237. data/rust-vendor/futures-task/src/future_obj.rs +335 -0
  238. data/rust-vendor/futures-task/src/lib.rs +50 -0
  239. data/rust-vendor/futures-task/src/noop_waker.rs +63 -0
  240. data/rust-vendor/futures-task/src/spawn.rs +192 -0
  241. data/rust-vendor/futures-task/src/waker.rs +60 -0
  242. data/rust-vendor/futures-task/src/waker_ref.rs +66 -0
  243. data/rust-vendor/futures-util/.cargo-checksum.json +1 -0
  244. data/rust-vendor/futures-util/.cargo_vcs_info.json +6 -0
  245. data/rust-vendor/futures-util/Cargo.lock +693 -0
  246. data/rust-vendor/futures-util/Cargo.toml +181 -0
  247. data/rust-vendor/futures-util/Cargo.toml.orig +65 -0
  248. data/rust-vendor/futures-util/LICENSE-APACHE +202 -0
  249. data/rust-vendor/futures-util/LICENSE-MIT +26 -0
  250. data/rust-vendor/futures-util/README.md +23 -0
  251. data/rust-vendor/futures-util/benches/bilock.rs +68 -0
  252. data/rust-vendor/futures-util/benches/flatten_unordered.rs +58 -0
  253. data/rust-vendor/futures-util/benches/futures_unordered.rs +43 -0
  254. data/rust-vendor/futures-util/benches/select.rs +35 -0
  255. data/rust-vendor/futures-util/src/abortable.rs +209 -0
  256. data/rust-vendor/futures-util/src/async_await/join_mod.rs +110 -0
  257. data/rust-vendor/futures-util/src/async_await/mod.rs +60 -0
  258. data/rust-vendor/futures-util/src/async_await/pending.rs +43 -0
  259. data/rust-vendor/futures-util/src/async_await/poll.rs +39 -0
  260. data/rust-vendor/futures-util/src/async_await/random.rs +54 -0
  261. data/rust-vendor/futures-util/src/async_await/select_mod.rs +340 -0
  262. data/rust-vendor/futures-util/src/async_await/stream_select_mod.rs +39 -0
  263. data/rust-vendor/futures-util/src/compat/compat01as03.rs +455 -0
  264. data/rust-vendor/futures-util/src/compat/compat03as01.rs +268 -0
  265. data/rust-vendor/futures-util/src/compat/executor.rs +86 -0
  266. data/rust-vendor/futures-util/src/compat/mod.rs +22 -0
  267. data/rust-vendor/futures-util/src/fns.rs +372 -0
  268. data/rust-vendor/futures-util/src/future/abortable.rs +19 -0
  269. data/rust-vendor/futures-util/src/future/always_ready.rs +62 -0
  270. data/rust-vendor/futures-util/src/future/either.rs +314 -0
  271. data/rust-vendor/futures-util/src/future/future/catch_unwind.rs +39 -0
  272. data/rust-vendor/futures-util/src/future/future/flatten.rs +153 -0
  273. data/rust-vendor/futures-util/src/future/future/fuse.rs +92 -0
  274. data/rust-vendor/futures-util/src/future/future/map.rs +66 -0
  275. data/rust-vendor/futures-util/src/future/future/mod.rs +603 -0
  276. data/rust-vendor/futures-util/src/future/future/remote_handle.rs +127 -0
  277. data/rust-vendor/futures-util/src/future/future/shared.rs +430 -0
  278. data/rust-vendor/futures-util/src/future/join.rs +217 -0
  279. data/rust-vendor/futures-util/src/future/join_all.rs +167 -0
  280. data/rust-vendor/futures-util/src/future/lazy.rs +60 -0
  281. data/rust-vendor/futures-util/src/future/maybe_done.rs +105 -0
  282. data/rust-vendor/futures-util/src/future/mod.rs +134 -0
  283. data/rust-vendor/futures-util/src/future/option.rs +64 -0
  284. data/rust-vendor/futures-util/src/future/pending.rs +55 -0
  285. data/rust-vendor/futures-util/src/future/poll_fn.rs +58 -0
  286. data/rust-vendor/futures-util/src/future/poll_immediate.rs +131 -0
  287. data/rust-vendor/futures-util/src/future/ready.rs +82 -0
  288. data/rust-vendor/futures-util/src/future/select.rs +133 -0
  289. data/rust-vendor/futures-util/src/future/select_all.rs +75 -0
  290. data/rust-vendor/futures-util/src/future/select_ok.rs +85 -0
  291. data/rust-vendor/futures-util/src/future/try_future/into_future.rs +36 -0
  292. data/rust-vendor/futures-util/src/future/try_future/mod.rs +625 -0
  293. data/rust-vendor/futures-util/src/future/try_future/try_flatten.rs +162 -0
  294. data/rust-vendor/futures-util/src/future/try_future/try_flatten_err.rs +62 -0
  295. data/rust-vendor/futures-util/src/future/try_join.rs +256 -0
  296. data/rust-vendor/futures-util/src/future/try_join_all.rs +201 -0
  297. data/rust-vendor/futures-util/src/future/try_maybe_done.rs +92 -0
  298. data/rust-vendor/futures-util/src/future/try_select.rs +85 -0
  299. data/rust-vendor/futures-util/src/io/allow_std.rs +202 -0
  300. data/rust-vendor/futures-util/src/io/buf_reader.rs +264 -0
  301. data/rust-vendor/futures-util/src/io/buf_writer.rs +229 -0
  302. data/rust-vendor/futures-util/src/io/chain.rs +142 -0
  303. data/rust-vendor/futures-util/src/io/close.rs +28 -0
  304. data/rust-vendor/futures-util/src/io/copy.rs +58 -0
  305. data/rust-vendor/futures-util/src/io/copy_buf.rs +78 -0
  306. data/rust-vendor/futures-util/src/io/copy_buf_abortable.rs +124 -0
  307. data/rust-vendor/futures-util/src/io/cursor.rs +234 -0
  308. data/rust-vendor/futures-util/src/io/empty.rs +59 -0
  309. data/rust-vendor/futures-util/src/io/fill_buf.rs +47 -0
  310. data/rust-vendor/futures-util/src/io/flush.rs +31 -0
  311. data/rust-vendor/futures-util/src/io/into_sink.rs +82 -0
  312. data/rust-vendor/futures-util/src/io/line_writer.rs +155 -0
  313. data/rust-vendor/futures-util/src/io/lines.rs +50 -0
  314. data/rust-vendor/futures-util/src/io/mod.rs +833 -0
  315. data/rust-vendor/futures-util/src/io/read.rs +30 -0
  316. data/rust-vendor/futures-util/src/io/read_exact.rs +42 -0
  317. data/rust-vendor/futures-util/src/io/read_line.rs +77 -0
  318. data/rust-vendor/futures-util/src/io/read_to_end.rs +90 -0
  319. data/rust-vendor/futures-util/src/io/read_to_string.rs +60 -0
  320. data/rust-vendor/futures-util/src/io/read_until.rs +60 -0
  321. data/rust-vendor/futures-util/src/io/read_vectored.rs +30 -0
  322. data/rust-vendor/futures-util/src/io/repeat.rs +66 -0
  323. data/rust-vendor/futures-util/src/io/seek.rs +30 -0
  324. data/rust-vendor/futures-util/src/io/sink.rs +67 -0
  325. data/rust-vendor/futures-util/src/io/split.rs +129 -0
  326. data/rust-vendor/futures-util/src/io/take.rs +125 -0
  327. data/rust-vendor/futures-util/src/io/window.rs +104 -0
  328. data/rust-vendor/futures-util/src/io/write.rs +30 -0
  329. data/rust-vendor/futures-util/src/io/write_all.rs +43 -0
  330. data/rust-vendor/futures-util/src/io/write_all_vectored.rs +195 -0
  331. data/rust-vendor/futures-util/src/io/write_vectored.rs +30 -0
  332. data/rust-vendor/futures-util/src/lib.rs +332 -0
  333. data/rust-vendor/futures-util/src/lock/bilock.rs +297 -0
  334. data/rust-vendor/futures-util/src/lock/mod.rs +27 -0
  335. data/rust-vendor/futures-util/src/lock/mutex.rs +560 -0
  336. data/rust-vendor/futures-util/src/macros.rs +31 -0
  337. data/rust-vendor/futures-util/src/never.rs +18 -0
  338. data/rust-vendor/futures-util/src/sink/buffer.rs +105 -0
  339. data/rust-vendor/futures-util/src/sink/close.rs +32 -0
  340. data/rust-vendor/futures-util/src/sink/drain.rs +59 -0
  341. data/rust-vendor/futures-util/src/sink/err_into.rs +57 -0
  342. data/rust-vendor/futures-util/src/sink/fanout.rs +111 -0
  343. data/rust-vendor/futures-util/src/sink/feed.rs +43 -0
  344. data/rust-vendor/futures-util/src/sink/flush.rs +36 -0
  345. data/rust-vendor/futures-util/src/sink/map_err.rs +65 -0
  346. data/rust-vendor/futures-util/src/sink/mod.rs +344 -0
  347. data/rust-vendor/futures-util/src/sink/send.rs +41 -0
  348. data/rust-vendor/futures-util/src/sink/send_all.rs +100 -0
  349. data/rust-vendor/futures-util/src/sink/unfold.rs +92 -0
  350. data/rust-vendor/futures-util/src/sink/with.rs +145 -0
  351. data/rust-vendor/futures-util/src/sink/with_flat_map.rs +127 -0
  352. data/rust-vendor/futures-util/src/stream/abortable.rs +19 -0
  353. data/rust-vendor/futures-util/src/stream/empty.rs +45 -0
  354. data/rust-vendor/futures-util/src/stream/futures_ordered.rs +260 -0
  355. data/rust-vendor/futures-util/src/stream/futures_unordered/abort.rs +12 -0
  356. data/rust-vendor/futures-util/src/stream/futures_unordered/iter.rs +172 -0
  357. data/rust-vendor/futures-util/src/stream/futures_unordered/mod.rs +674 -0
  358. data/rust-vendor/futures-util/src/stream/futures_unordered/ready_to_run_queue.rs +113 -0
  359. data/rust-vendor/futures-util/src/stream/futures_unordered/task.rs +214 -0
  360. data/rust-vendor/futures-util/src/stream/iter.rs +66 -0
  361. data/rust-vendor/futures-util/src/stream/mod.rs +148 -0
  362. data/rust-vendor/futures-util/src/stream/once.rs +67 -0
  363. data/rust-vendor/futures-util/src/stream/pending.rs +45 -0
  364. data/rust-vendor/futures-util/src/stream/poll_fn.rs +57 -0
  365. data/rust-vendor/futures-util/src/stream/poll_immediate.rs +80 -0
  366. data/rust-vendor/futures-util/src/stream/repeat.rs +58 -0
  367. data/rust-vendor/futures-util/src/stream/repeat_with.rs +93 -0
  368. data/rust-vendor/futures-util/src/stream/select.rs +117 -0
  369. data/rust-vendor/futures-util/src/stream/select_all.rs +249 -0
  370. data/rust-vendor/futures-util/src/stream/select_with_strategy.rs +304 -0
  371. data/rust-vendor/futures-util/src/stream/stream/all.rs +93 -0
  372. data/rust-vendor/futures-util/src/stream/stream/any.rs +93 -0
  373. data/rust-vendor/futures-util/src/stream/stream/buffer_unordered.rs +120 -0
  374. data/rust-vendor/futures-util/src/stream/stream/buffered.rs +118 -0
  375. data/rust-vendor/futures-util/src/stream/stream/catch_unwind.rs +62 -0
  376. data/rust-vendor/futures-util/src/stream/stream/chain.rs +76 -0
  377. data/rust-vendor/futures-util/src/stream/stream/chunks.rs +103 -0
  378. data/rust-vendor/futures-util/src/stream/stream/collect.rs +56 -0
  379. data/rust-vendor/futures-util/src/stream/stream/concat.rs +62 -0
  380. data/rust-vendor/futures-util/src/stream/stream/count.rs +53 -0
  381. data/rust-vendor/futures-util/src/stream/stream/cycle.rs +67 -0
  382. data/rust-vendor/futures-util/src/stream/stream/enumerate.rs +64 -0
  383. data/rust-vendor/futures-util/src/stream/stream/filter.rs +117 -0
  384. data/rust-vendor/futures-util/src/stream/stream/filter_map.rs +111 -0
  385. data/rust-vendor/futures-util/src/stream/stream/flatten.rs +73 -0
  386. data/rust-vendor/futures-util/src/stream/stream/flatten_unordered.rs +531 -0
  387. data/rust-vendor/futures-util/src/stream/stream/fold.rs +88 -0
  388. data/rust-vendor/futures-util/src/stream/stream/for_each.rs +78 -0
  389. data/rust-vendor/futures-util/src/stream/stream/for_each_concurrent.rs +119 -0
  390. data/rust-vendor/futures-util/src/stream/stream/forward.rs +75 -0
  391. data/rust-vendor/futures-util/src/stream/stream/fuse.rs +75 -0
  392. data/rust-vendor/futures-util/src/stream/stream/into_future.rs +90 -0
  393. data/rust-vendor/futures-util/src/stream/stream/map.rs +77 -0
  394. data/rust-vendor/futures-util/src/stream/stream/mod.rs +1697 -0
  395. data/rust-vendor/futures-util/src/stream/stream/next.rs +34 -0
  396. data/rust-vendor/futures-util/src/stream/stream/peek.rs +441 -0
  397. data/rust-vendor/futures-util/src/stream/stream/ready_chunks.rs +93 -0
  398. data/rust-vendor/futures-util/src/stream/stream/scan.rs +128 -0
  399. data/rust-vendor/futures-util/src/stream/stream/select_next_some.rs +42 -0
  400. data/rust-vendor/futures-util/src/stream/stream/skip.rs +70 -0
  401. data/rust-vendor/futures-util/src/stream/stream/skip_while.rs +124 -0
  402. data/rust-vendor/futures-util/src/stream/stream/split.rs +224 -0
  403. data/rust-vendor/futures-util/src/stream/stream/take.rs +86 -0
  404. data/rust-vendor/futures-util/src/stream/stream/take_until.rs +170 -0
  405. data/rust-vendor/futures-util/src/stream/stream/take_while.rs +124 -0
  406. data/rust-vendor/futures-util/src/stream/stream/then.rs +101 -0
  407. data/rust-vendor/futures-util/src/stream/stream/unzip.rs +63 -0
  408. data/rust-vendor/futures-util/src/stream/stream/zip.rs +128 -0
  409. data/rust-vendor/futures-util/src/stream/try_stream/and_then.rs +105 -0
  410. data/rust-vendor/futures-util/src/stream/try_stream/into_async_read.rs +166 -0
  411. data/rust-vendor/futures-util/src/stream/try_stream/into_stream.rs +52 -0
  412. data/rust-vendor/futures-util/src/stream/try_stream/mod.rs +1254 -0
  413. data/rust-vendor/futures-util/src/stream/try_stream/or_else.rs +109 -0
  414. data/rust-vendor/futures-util/src/stream/try_stream/try_all.rs +98 -0
  415. data/rust-vendor/futures-util/src/stream/try_stream/try_any.rs +98 -0
  416. data/rust-vendor/futures-util/src/stream/try_stream/try_buffer_unordered.rs +86 -0
  417. data/rust-vendor/futures-util/src/stream/try_stream/try_buffered.rs +87 -0
  418. data/rust-vendor/futures-util/src/stream/try_stream/try_chunks.rs +132 -0
  419. data/rust-vendor/futures-util/src/stream/try_stream/try_collect.rs +52 -0
  420. data/rust-vendor/futures-util/src/stream/try_stream/try_concat.rs +51 -0
  421. data/rust-vendor/futures-util/src/stream/try_stream/try_filter.rs +112 -0
  422. data/rust-vendor/futures-util/src/stream/try_stream/try_filter_map.rs +106 -0
  423. data/rust-vendor/futures-util/src/stream/try_stream/try_flatten.rs +84 -0
  424. data/rust-vendor/futures-util/src/stream/try_stream/try_flatten_unordered.rs +176 -0
  425. data/rust-vendor/futures-util/src/stream/try_stream/try_fold.rs +93 -0
  426. data/rust-vendor/futures-util/src/stream/try_stream/try_for_each.rs +68 -0
  427. data/rust-vendor/futures-util/src/stream/try_stream/try_for_each_concurrent.rs +132 -0
  428. data/rust-vendor/futures-util/src/stream/try_stream/try_next.rs +34 -0
  429. data/rust-vendor/futures-util/src/stream/try_stream/try_ready_chunks.rs +126 -0
  430. data/rust-vendor/futures-util/src/stream/try_stream/try_skip_while.rs +120 -0
  431. data/rust-vendor/futures-util/src/stream/try_stream/try_take_while.rs +129 -0
  432. data/rust-vendor/futures-util/src/stream/try_stream/try_unfold.rs +122 -0
  433. data/rust-vendor/futures-util/src/stream/unfold.rs +119 -0
  434. data/rust-vendor/futures-util/src/task/mod.rs +40 -0
  435. data/rust-vendor/futures-util/src/task/spawn.rs +169 -0
  436. data/rust-vendor/futures-util/src/unfold_state.rs +39 -0
  437. data/rust-vendor/html-to-markdown-rs/Cargo.toml +2 -2
  438. data/rust-vendor/html-to-markdown-rs/src/convert_api.rs +5 -1
  439. data/rust-vendor/html-to-markdown-rs/src/converter/block/paragraph.rs +1 -0
  440. data/rust-vendor/html-to-markdown-rs/src/converter/context.rs +5 -0
  441. data/rust-vendor/html-to-markdown-rs/src/converter/text_node.rs +6 -1
  442. data/rust-vendor/html-to-markdown-rs/src/converter/visitor_hooks.rs +9 -3
  443. data/rust-vendor/html-to-markdown-rs/tests/convert_with_metadata_no_frontmatter.rs +100 -0
  444. data/rust-vendor/html-to-markdown-rs/tests/issue_212_regressions.rs +63 -0
  445. data/rust-vendor/html-to-markdown-rs/tests/visitor_integration_test.rs +58 -0
  446. data/rust-vendor/html5ever/.cargo-checksum.json +1 -1
  447. data/rust-vendor/html5ever/.cargo_vcs_info.json +1 -1
  448. data/rust-vendor/html5ever/Cargo.lock +216 -128
  449. data/rust-vendor/html5ever/Cargo.toml +11 -6
  450. data/rust-vendor/html5ever/Cargo.toml.orig +1 -0
  451. data/rust-vendor/html5ever/examples/arena.rs +30 -1
  452. data/rust-vendor/html5ever/src/driver.rs +19 -5
  453. data/rust-vendor/html5ever/src/encoding.rs +173 -0
  454. data/rust-vendor/html5ever/src/lib.rs +1 -0
  455. data/rust-vendor/html5ever/src/serialize/mod.rs +2 -2
  456. data/rust-vendor/html5ever/src/tokenizer/interface.rs +42 -4
  457. data/rust-vendor/html5ever/src/tokenizer/mod.rs +24 -1
  458. data/rust-vendor/html5ever/src/tokenizer/states.rs +34 -0
  459. data/rust-vendor/html5ever/src/tree_builder/mod.rs +8 -13
  460. data/rust-vendor/html5ever/src/tree_builder/rules.rs +131 -153
  461. data/rust-vendor/html5ever/src/tree_builder/tag_sets.rs +1 -6
  462. data/rust-vendor/html5ever/src/tree_builder/types.rs +22 -2
  463. data/rust-vendor/html5ever/tests/driver.rs +111 -0
  464. data/rust-vendor/js-sys/.cargo-checksum.json +1 -1
  465. data/rust-vendor/js-sys/.cargo_vcs_info.json +1 -1
  466. data/rust-vendor/js-sys/Cargo.lock +19 -19
  467. data/rust-vendor/js-sys/Cargo.toml +7 -3
  468. data/rust-vendor/js-sys/Cargo.toml.orig +7 -3
  469. data/rust-vendor/js-sys/README.md +2 -2
  470. data/rust-vendor/js-sys/src/Temporal.rs +2990 -663
  471. data/rust-vendor/js-sys/src/lib.rs +7485 -731
  472. data/rust-vendor/linux-raw-sys/.cargo-checksum.json +1 -1
  473. data/rust-vendor/linux-raw-sys/.cargo_vcs_info.json +1 -1
  474. data/rust-vendor/linux-raw-sys/Cargo.lock +3 -3
  475. data/rust-vendor/linux-raw-sys/Cargo.toml +3 -1
  476. data/rust-vendor/linux-raw-sys/Cargo.toml.orig +3 -1
  477. data/rust-vendor/linux-raw-sys/src/aarch64/btrfs.rs +42 -1
  478. data/rust-vendor/linux-raw-sys/src/aarch64/general.rs +52 -2
  479. data/rust-vendor/linux-raw-sys/src/aarch64/if_arp.rs +6 -2
  480. data/rust-vendor/linux-raw-sys/src/aarch64/if_tun.rs +319 -0
  481. data/rust-vendor/linux-raw-sys/src/aarch64/io_uring.rs +52 -1
  482. data/rust-vendor/linux-raw-sys/src/aarch64/ioctl.rs +0 -1
  483. data/rust-vendor/linux-raw-sys/src/aarch64/net.rs +5 -1
  484. data/rust-vendor/linux-raw-sys/src/aarch64/netlink.rs +153 -6
  485. data/rust-vendor/linux-raw-sys/src/aarch64/prctl.rs +3 -2
  486. data/rust-vendor/linux-raw-sys/src/aarch64/ptrace.rs +2 -0
  487. data/rust-vendor/linux-raw-sys/src/aarch64/vm_sockets.rs +111 -0
  488. data/rust-vendor/linux-raw-sys/src/aarch64/xdp.rs +1 -0
  489. data/rust-vendor/linux-raw-sys/src/arm/btrfs.rs +42 -1
  490. data/rust-vendor/linux-raw-sys/src/arm/general.rs +52 -2
  491. data/rust-vendor/linux-raw-sys/src/arm/if_arp.rs +6 -2
  492. data/rust-vendor/linux-raw-sys/src/arm/if_tun.rs +317 -0
  493. data/rust-vendor/linux-raw-sys/src/arm/io_uring.rs +52 -1
  494. data/rust-vendor/linux-raw-sys/src/arm/ioctl.rs +0 -1
  495. data/rust-vendor/linux-raw-sys/src/arm/net.rs +5 -1
  496. data/rust-vendor/linux-raw-sys/src/arm/netlink.rs +153 -6
  497. data/rust-vendor/linux-raw-sys/src/arm/prctl.rs +3 -2
  498. data/rust-vendor/linux-raw-sys/src/arm/vm_sockets.rs +108 -0
  499. data/rust-vendor/linux-raw-sys/src/arm/xdp.rs +1 -0
  500. data/rust-vendor/linux-raw-sys/src/csky/btrfs.rs +42 -1
  501. data/rust-vendor/linux-raw-sys/src/csky/general.rs +52 -2
  502. data/rust-vendor/linux-raw-sys/src/csky/if_arp.rs +6 -2
  503. data/rust-vendor/linux-raw-sys/src/csky/if_tun.rs +317 -0
  504. data/rust-vendor/linux-raw-sys/src/csky/io_uring.rs +52 -1
  505. data/rust-vendor/linux-raw-sys/src/csky/net.rs +5 -1
  506. data/rust-vendor/linux-raw-sys/src/csky/netlink.rs +153 -6
  507. data/rust-vendor/linux-raw-sys/src/csky/prctl.rs +3 -2
  508. data/rust-vendor/linux-raw-sys/src/csky/vm_sockets.rs +108 -0
  509. data/rust-vendor/linux-raw-sys/src/csky/xdp.rs +1 -0
  510. data/rust-vendor/linux-raw-sys/src/hexagon/auxvec.rs +30 -0
  511. data/rust-vendor/linux-raw-sys/src/hexagon/bootparam.rs +3 -0
  512. data/rust-vendor/linux-raw-sys/src/hexagon/btrfs.rs +1935 -0
  513. data/rust-vendor/linux-raw-sys/src/hexagon/elf_uapi.rs +652 -0
  514. data/rust-vendor/linux-raw-sys/src/hexagon/errno.rs +135 -0
  515. data/rust-vendor/linux-raw-sys/src/hexagon/general.rs +3284 -0
  516. data/rust-vendor/linux-raw-sys/src/hexagon/if_arp.rs +2793 -0
  517. data/rust-vendor/linux-raw-sys/src/hexagon/if_ether.rs +168 -0
  518. data/rust-vendor/linux-raw-sys/src/hexagon/if_packet.rs +309 -0
  519. data/rust-vendor/linux-raw-sys/src/hexagon/if_tun.rs +317 -0
  520. data/rust-vendor/linux-raw-sys/src/hexagon/image.rs +3 -0
  521. data/rust-vendor/linux-raw-sys/src/hexagon/io_uring.rs +1489 -0
  522. data/rust-vendor/linux-raw-sys/src/hexagon/ioctl.rs +3 -0
  523. data/rust-vendor/linux-raw-sys/src/hexagon/landlock.rs +102 -0
  524. data/rust-vendor/linux-raw-sys/src/hexagon/loop_device.rs +132 -0
  525. data/rust-vendor/linux-raw-sys/src/hexagon/mempolicy.rs +175 -0
  526. data/rust-vendor/linux-raw-sys/src/hexagon/net.rs +3487 -0
  527. data/rust-vendor/linux-raw-sys/src/hexagon/netlink.rs +5606 -0
  528. data/rust-vendor/linux-raw-sys/src/hexagon/prctl.rs +270 -0
  529. data/rust-vendor/linux-raw-sys/src/hexagon/ptrace.rs +1091 -0
  530. data/rust-vendor/linux-raw-sys/src/hexagon/system.rs +100 -0
  531. data/rust-vendor/linux-raw-sys/src/hexagon/vm_sockets.rs +108 -0
  532. data/rust-vendor/linux-raw-sys/src/hexagon/xdp.rs +192 -0
  533. data/rust-vendor/linux-raw-sys/src/lib.rs +329 -0
  534. data/rust-vendor/linux-raw-sys/src/loongarch64/btrfs.rs +42 -1
  535. data/rust-vendor/linux-raw-sys/src/loongarch64/general.rs +52 -2
  536. data/rust-vendor/linux-raw-sys/src/loongarch64/if_arp.rs +6 -2
  537. data/rust-vendor/linux-raw-sys/src/loongarch64/if_tun.rs +319 -0
  538. data/rust-vendor/linux-raw-sys/src/loongarch64/io_uring.rs +52 -1
  539. data/rust-vendor/linux-raw-sys/src/loongarch64/net.rs +5 -1
  540. data/rust-vendor/linux-raw-sys/src/loongarch64/netlink.rs +153 -6
  541. data/rust-vendor/linux-raw-sys/src/loongarch64/prctl.rs +3 -2
  542. data/rust-vendor/linux-raw-sys/src/loongarch64/vm_sockets.rs +111 -0
  543. data/rust-vendor/linux-raw-sys/src/loongarch64/xdp.rs +1 -0
  544. data/rust-vendor/linux-raw-sys/src/m68k/auxvec.rs +30 -0
  545. data/rust-vendor/linux-raw-sys/src/m68k/bootparam.rs +3 -0
  546. data/rust-vendor/linux-raw-sys/src/m68k/btrfs.rs +1935 -0
  547. data/rust-vendor/linux-raw-sys/src/m68k/elf_uapi.rs +652 -0
  548. data/rust-vendor/linux-raw-sys/src/m68k/errno.rs +135 -0
  549. data/rust-vendor/linux-raw-sys/src/m68k/general.rs +3379 -0
  550. data/rust-vendor/linux-raw-sys/src/m68k/if_arp.rs +2793 -0
  551. data/rust-vendor/linux-raw-sys/src/m68k/if_ether.rs +168 -0
  552. data/rust-vendor/linux-raw-sys/src/m68k/if_packet.rs +309 -0
  553. data/rust-vendor/linux-raw-sys/src/m68k/if_tun.rs +317 -0
  554. data/rust-vendor/linux-raw-sys/src/m68k/image.rs +3 -0
  555. data/rust-vendor/linux-raw-sys/src/m68k/io_uring.rs +1489 -0
  556. data/rust-vendor/linux-raw-sys/src/m68k/ioctl.rs +1501 -0
  557. data/rust-vendor/linux-raw-sys/src/m68k/landlock.rs +102 -0
  558. data/rust-vendor/linux-raw-sys/src/m68k/loop_device.rs +132 -0
  559. data/rust-vendor/linux-raw-sys/src/m68k/mempolicy.rs +175 -0
  560. data/rust-vendor/linux-raw-sys/src/m68k/net.rs +3487 -0
  561. data/rust-vendor/linux-raw-sys/src/m68k/netlink.rs +5606 -0
  562. data/rust-vendor/linux-raw-sys/src/m68k/prctl.rs +270 -0
  563. data/rust-vendor/linux-raw-sys/src/m68k/ptrace.rs +1019 -0
  564. data/rust-vendor/linux-raw-sys/src/m68k/system.rs +100 -0
  565. data/rust-vendor/linux-raw-sys/src/m68k/vm_sockets.rs +108 -0
  566. data/rust-vendor/linux-raw-sys/src/m68k/xdp.rs +192 -0
  567. data/rust-vendor/linux-raw-sys/src/mips/btrfs.rs +42 -1
  568. data/rust-vendor/linux-raw-sys/src/mips/general.rs +52 -2
  569. data/rust-vendor/linux-raw-sys/src/mips/if_arp.rs +6 -2
  570. data/rust-vendor/linux-raw-sys/src/mips/if_tun.rs +327 -0
  571. data/rust-vendor/linux-raw-sys/src/mips/io_uring.rs +52 -1
  572. data/rust-vendor/linux-raw-sys/src/mips/ioctl.rs +0 -1
  573. data/rust-vendor/linux-raw-sys/src/mips/net.rs +5 -1
  574. data/rust-vendor/linux-raw-sys/src/mips/netlink.rs +153 -6
  575. data/rust-vendor/linux-raw-sys/src/mips/prctl.rs +3 -2
  576. data/rust-vendor/linux-raw-sys/src/mips/vm_sockets.rs +118 -0
  577. data/rust-vendor/linux-raw-sys/src/mips/xdp.rs +1 -0
  578. data/rust-vendor/linux-raw-sys/src/mips32r6/btrfs.rs +42 -1
  579. data/rust-vendor/linux-raw-sys/src/mips32r6/general.rs +52 -2
  580. data/rust-vendor/linux-raw-sys/src/mips32r6/if_arp.rs +6 -2
  581. data/rust-vendor/linux-raw-sys/src/mips32r6/if_tun.rs +327 -0
  582. data/rust-vendor/linux-raw-sys/src/mips32r6/io_uring.rs +52 -1
  583. data/rust-vendor/linux-raw-sys/src/mips32r6/ioctl.rs +0 -1
  584. data/rust-vendor/linux-raw-sys/src/mips32r6/net.rs +5 -1
  585. data/rust-vendor/linux-raw-sys/src/mips32r6/netlink.rs +153 -6
  586. data/rust-vendor/linux-raw-sys/src/mips32r6/prctl.rs +3 -2
  587. data/rust-vendor/linux-raw-sys/src/mips32r6/vm_sockets.rs +118 -0
  588. data/rust-vendor/linux-raw-sys/src/mips32r6/xdp.rs +1 -0
  589. data/rust-vendor/linux-raw-sys/src/mips64/btrfs.rs +42 -1
  590. data/rust-vendor/linux-raw-sys/src/mips64/general.rs +52 -2
  591. data/rust-vendor/linux-raw-sys/src/mips64/if_arp.rs +6 -2
  592. data/rust-vendor/linux-raw-sys/src/mips64/if_tun.rs +329 -0
  593. data/rust-vendor/linux-raw-sys/src/mips64/io_uring.rs +52 -1
  594. data/rust-vendor/linux-raw-sys/src/mips64/ioctl.rs +0 -1
  595. data/rust-vendor/linux-raw-sys/src/mips64/net.rs +5 -1
  596. data/rust-vendor/linux-raw-sys/src/mips64/netlink.rs +153 -6
  597. data/rust-vendor/linux-raw-sys/src/mips64/prctl.rs +3 -2
  598. data/rust-vendor/linux-raw-sys/src/mips64/vm_sockets.rs +121 -0
  599. data/rust-vendor/linux-raw-sys/src/mips64/xdp.rs +1 -0
  600. data/rust-vendor/linux-raw-sys/src/mips64r6/btrfs.rs +42 -1
  601. data/rust-vendor/linux-raw-sys/src/mips64r6/general.rs +52 -2
  602. data/rust-vendor/linux-raw-sys/src/mips64r6/if_arp.rs +6 -2
  603. data/rust-vendor/linux-raw-sys/src/mips64r6/if_tun.rs +329 -0
  604. data/rust-vendor/linux-raw-sys/src/mips64r6/io_uring.rs +52 -1
  605. data/rust-vendor/linux-raw-sys/src/mips64r6/ioctl.rs +0 -1
  606. data/rust-vendor/linux-raw-sys/src/mips64r6/net.rs +5 -1
  607. data/rust-vendor/linux-raw-sys/src/mips64r6/netlink.rs +153 -6
  608. data/rust-vendor/linux-raw-sys/src/mips64r6/prctl.rs +3 -2
  609. data/rust-vendor/linux-raw-sys/src/mips64r6/vm_sockets.rs +121 -0
  610. data/rust-vendor/linux-raw-sys/src/mips64r6/xdp.rs +1 -0
  611. data/rust-vendor/linux-raw-sys/src/powerpc/btrfs.rs +42 -1
  612. data/rust-vendor/linux-raw-sys/src/powerpc/general.rs +52 -2
  613. data/rust-vendor/linux-raw-sys/src/powerpc/if_arp.rs +6 -2
  614. data/rust-vendor/linux-raw-sys/src/powerpc/if_tun.rs +323 -0
  615. data/rust-vendor/linux-raw-sys/src/powerpc/io_uring.rs +52 -1
  616. data/rust-vendor/linux-raw-sys/src/powerpc/ioctl.rs +0 -1
  617. data/rust-vendor/linux-raw-sys/src/powerpc/net.rs +5 -1
  618. data/rust-vendor/linux-raw-sys/src/powerpc/netlink.rs +153 -6
  619. data/rust-vendor/linux-raw-sys/src/powerpc/prctl.rs +3 -2
  620. data/rust-vendor/linux-raw-sys/src/powerpc/vm_sockets.rs +114 -0
  621. data/rust-vendor/linux-raw-sys/src/powerpc/xdp.rs +1 -0
  622. data/rust-vendor/linux-raw-sys/src/powerpc64/btrfs.rs +42 -1
  623. data/rust-vendor/linux-raw-sys/src/powerpc64/general.rs +52 -2
  624. data/rust-vendor/linux-raw-sys/src/powerpc64/if_arp.rs +6 -2
  625. data/rust-vendor/linux-raw-sys/src/powerpc64/if_tun.rs +325 -0
  626. data/rust-vendor/linux-raw-sys/src/powerpc64/io_uring.rs +52 -1
  627. data/rust-vendor/linux-raw-sys/src/powerpc64/ioctl.rs +0 -1
  628. data/rust-vendor/linux-raw-sys/src/powerpc64/net.rs +5 -1
  629. data/rust-vendor/linux-raw-sys/src/powerpc64/netlink.rs +153 -6
  630. data/rust-vendor/linux-raw-sys/src/powerpc64/prctl.rs +3 -2
  631. data/rust-vendor/linux-raw-sys/src/powerpc64/vm_sockets.rs +117 -0
  632. data/rust-vendor/linux-raw-sys/src/powerpc64/xdp.rs +1 -0
  633. data/rust-vendor/linux-raw-sys/src/riscv32/btrfs.rs +42 -1
  634. data/rust-vendor/linux-raw-sys/src/riscv32/general.rs +52 -2
  635. data/rust-vendor/linux-raw-sys/src/riscv32/if_arp.rs +6 -2
  636. data/rust-vendor/linux-raw-sys/src/riscv32/if_tun.rs +317 -0
  637. data/rust-vendor/linux-raw-sys/src/riscv32/io_uring.rs +52 -1
  638. data/rust-vendor/linux-raw-sys/src/riscv32/net.rs +5 -1
  639. data/rust-vendor/linux-raw-sys/src/riscv32/netlink.rs +153 -6
  640. data/rust-vendor/linux-raw-sys/src/riscv32/prctl.rs +3 -2
  641. data/rust-vendor/linux-raw-sys/src/riscv32/vm_sockets.rs +108 -0
  642. data/rust-vendor/linux-raw-sys/src/riscv32/xdp.rs +1 -0
  643. data/rust-vendor/linux-raw-sys/src/riscv64/btrfs.rs +42 -1
  644. data/rust-vendor/linux-raw-sys/src/riscv64/general.rs +52 -2
  645. data/rust-vendor/linux-raw-sys/src/riscv64/if_arp.rs +6 -2
  646. data/rust-vendor/linux-raw-sys/src/riscv64/if_tun.rs +319 -0
  647. data/rust-vendor/linux-raw-sys/src/riscv64/io_uring.rs +52 -1
  648. data/rust-vendor/linux-raw-sys/src/riscv64/ioctl.rs +0 -1
  649. data/rust-vendor/linux-raw-sys/src/riscv64/net.rs +5 -1
  650. data/rust-vendor/linux-raw-sys/src/riscv64/netlink.rs +153 -6
  651. data/rust-vendor/linux-raw-sys/src/riscv64/prctl.rs +3 -2
  652. data/rust-vendor/linux-raw-sys/src/riscv64/vm_sockets.rs +111 -0
  653. data/rust-vendor/linux-raw-sys/src/riscv64/xdp.rs +1 -0
  654. data/rust-vendor/linux-raw-sys/src/s390x/btrfs.rs +42 -1
  655. data/rust-vendor/linux-raw-sys/src/s390x/general.rs +52 -2
  656. data/rust-vendor/linux-raw-sys/src/s390x/if_arp.rs +6 -2
  657. data/rust-vendor/linux-raw-sys/src/s390x/if_tun.rs +339 -0
  658. data/rust-vendor/linux-raw-sys/src/s390x/io_uring.rs +52 -1
  659. data/rust-vendor/linux-raw-sys/src/s390x/ioctl.rs +0 -1
  660. data/rust-vendor/linux-raw-sys/src/s390x/net.rs +5 -1
  661. data/rust-vendor/linux-raw-sys/src/s390x/netlink.rs +153 -6
  662. data/rust-vendor/linux-raw-sys/src/s390x/prctl.rs +3 -2
  663. data/rust-vendor/linux-raw-sys/src/s390x/vm_sockets.rs +131 -0
  664. data/rust-vendor/linux-raw-sys/src/s390x/xdp.rs +1 -0
  665. data/rust-vendor/linux-raw-sys/src/sparc/btrfs.rs +42 -1
  666. data/rust-vendor/linux-raw-sys/src/sparc/general.rs +52 -2
  667. data/rust-vendor/linux-raw-sys/src/sparc/if_arp.rs +6 -2
  668. data/rust-vendor/linux-raw-sys/src/sparc/if_tun.rs +317 -0
  669. data/rust-vendor/linux-raw-sys/src/sparc/io_uring.rs +52 -1
  670. data/rust-vendor/linux-raw-sys/src/sparc/net.rs +5 -1
  671. data/rust-vendor/linux-raw-sys/src/sparc/netlink.rs +153 -6
  672. data/rust-vendor/linux-raw-sys/src/sparc/prctl.rs +3 -2
  673. data/rust-vendor/linux-raw-sys/src/sparc/vm_sockets.rs +108 -0
  674. data/rust-vendor/linux-raw-sys/src/sparc/xdp.rs +1 -0
  675. data/rust-vendor/linux-raw-sys/src/sparc64/btrfs.rs +42 -1
  676. data/rust-vendor/linux-raw-sys/src/sparc64/general.rs +52 -2
  677. data/rust-vendor/linux-raw-sys/src/sparc64/if_arp.rs +6 -2
  678. data/rust-vendor/linux-raw-sys/src/sparc64/if_tun.rs +325 -0
  679. data/rust-vendor/linux-raw-sys/src/sparc64/io_uring.rs +52 -1
  680. data/rust-vendor/linux-raw-sys/src/sparc64/net.rs +5 -1
  681. data/rust-vendor/linux-raw-sys/src/sparc64/netlink.rs +153 -6
  682. data/rust-vendor/linux-raw-sys/src/sparc64/prctl.rs +3 -2
  683. data/rust-vendor/linux-raw-sys/src/sparc64/vm_sockets.rs +117 -0
  684. data/rust-vendor/linux-raw-sys/src/sparc64/xdp.rs +1 -0
  685. data/rust-vendor/linux-raw-sys/src/x32/btrfs.rs +42 -1
  686. data/rust-vendor/linux-raw-sys/src/x32/general.rs +52 -2
  687. data/rust-vendor/linux-raw-sys/src/x32/if_arp.rs +6 -2
  688. data/rust-vendor/linux-raw-sys/src/x32/if_tun.rs +319 -0
  689. data/rust-vendor/linux-raw-sys/src/x32/io_uring.rs +52 -1
  690. data/rust-vendor/linux-raw-sys/src/x32/ioctl.rs +0 -1
  691. data/rust-vendor/linux-raw-sys/src/x32/net.rs +5 -1
  692. data/rust-vendor/linux-raw-sys/src/x32/netlink.rs +153 -6
  693. data/rust-vendor/linux-raw-sys/src/x32/prctl.rs +3 -2
  694. data/rust-vendor/linux-raw-sys/src/x32/vm_sockets.rs +111 -0
  695. data/rust-vendor/linux-raw-sys/src/x32/xdp.rs +1 -0
  696. data/rust-vendor/linux-raw-sys/src/x86/btrfs.rs +42 -1
  697. data/rust-vendor/linux-raw-sys/src/x86/general.rs +52 -2
  698. data/rust-vendor/linux-raw-sys/src/x86/if_arp.rs +6 -2
  699. data/rust-vendor/linux-raw-sys/src/x86/if_tun.rs +317 -0
  700. data/rust-vendor/linux-raw-sys/src/x86/io_uring.rs +52 -1
  701. data/rust-vendor/linux-raw-sys/src/x86/ioctl.rs +0 -1
  702. data/rust-vendor/linux-raw-sys/src/x86/net.rs +5 -1
  703. data/rust-vendor/linux-raw-sys/src/x86/netlink.rs +153 -6
  704. data/rust-vendor/linux-raw-sys/src/x86/prctl.rs +3 -2
  705. data/rust-vendor/linux-raw-sys/src/x86/vm_sockets.rs +108 -0
  706. data/rust-vendor/linux-raw-sys/src/x86/xdp.rs +1 -0
  707. data/rust-vendor/linux-raw-sys/src/x86_64/btrfs.rs +42 -1
  708. data/rust-vendor/linux-raw-sys/src/x86_64/general.rs +52 -2
  709. data/rust-vendor/linux-raw-sys/src/x86_64/if_arp.rs +6 -2
  710. data/rust-vendor/linux-raw-sys/src/x86_64/if_tun.rs +319 -0
  711. data/rust-vendor/linux-raw-sys/src/x86_64/io_uring.rs +52 -1
  712. data/rust-vendor/linux-raw-sys/src/x86_64/ioctl.rs +0 -1
  713. data/rust-vendor/linux-raw-sys/src/x86_64/net.rs +5 -1
  714. data/rust-vendor/linux-raw-sys/src/x86_64/netlink.rs +153 -6
  715. data/rust-vendor/linux-raw-sys/src/x86_64/prctl.rs +3 -2
  716. data/rust-vendor/linux-raw-sys/src/x86_64/vm_sockets.rs +111 -0
  717. data/rust-vendor/linux-raw-sys/src/x86_64/xdp.rs +1 -0
  718. data/rust-vendor/markup5ever/.cargo-checksum.json +1 -1
  719. data/rust-vendor/markup5ever/.cargo_vcs_info.json +1 -1
  720. data/rust-vendor/markup5ever/Cargo.toml +6 -3
  721. data/rust-vendor/markup5ever/Cargo.toml.orig +3 -0
  722. data/rust-vendor/markup5ever/interface/mod.rs +9 -0
  723. data/rust-vendor/markup5ever/interface/tree_builder.rs +11 -0
  724. data/rust-vendor/pin-project-lite/.cargo-checksum.json +1 -0
  725. data/rust-vendor/pin-project-lite/.cargo_vcs_info.json +6 -0
  726. data/rust-vendor/pin-project-lite/CHANGELOG.md +264 -0
  727. data/rust-vendor/pin-project-lite/Cargo.lock +23 -0
  728. data/rust-vendor/pin-project-lite/Cargo.toml +198 -0
  729. data/rust-vendor/pin-project-lite/Cargo.toml.orig +91 -0
  730. data/rust-vendor/pin-project-lite/LICENSE-APACHE +177 -0
  731. data/rust-vendor/pin-project-lite/LICENSE-MIT +23 -0
  732. data/rust-vendor/pin-project-lite/README.md +129 -0
  733. data/rust-vendor/pin-project-lite/src/lib.rs +1770 -0
  734. data/rust-vendor/pin-project-lite/tests/auxiliary/mod.rs +14 -0
  735. data/rust-vendor/pin-project-lite/tests/compiletest.rs +11 -0
  736. data/rust-vendor/pin-project-lite/tests/drop_order.rs +169 -0
  737. data/rust-vendor/pin-project-lite/tests/expand/.rustfmt.toml +1 -0
  738. data/rust-vendor/pin-project-lite/tests/expand/default/enum.expanded.rs +166 -0
  739. data/rust-vendor/pin-project-lite/tests/expand/default/enum.rs +19 -0
  740. data/rust-vendor/pin-project-lite/tests/expand/default/struct.expanded.rs +107 -0
  741. data/rust-vendor/pin-project-lite/tests/expand/default/struct.rs +13 -0
  742. data/rust-vendor/pin-project-lite/tests/expand/multifields/enum.expanded.rs +102 -0
  743. data/rust-vendor/pin-project-lite/tests/expand/multifields/enum.rs +20 -0
  744. data/rust-vendor/pin-project-lite/tests/expand/multifields/struct.expanded.rs +174 -0
  745. data/rust-vendor/pin-project-lite/tests/expand/multifields/struct.rs +17 -0
  746. data/rust-vendor/pin-project-lite/tests/expand/naming/enum-all.expanded.rs +166 -0
  747. data/rust-vendor/pin-project-lite/tests/expand/naming/enum-all.rs +19 -0
  748. data/rust-vendor/pin-project-lite/tests/expand/naming/enum-mut.expanded.rs +76 -0
  749. data/rust-vendor/pin-project-lite/tests/expand/naming/enum-mut.rs +17 -0
  750. data/rust-vendor/pin-project-lite/tests/expand/naming/enum-none.expanded.rs +33 -0
  751. data/rust-vendor/pin-project-lite/tests/expand/naming/enum-none.rs +16 -0
  752. data/rust-vendor/pin-project-lite/tests/expand/naming/enum-ref.expanded.rs +76 -0
  753. data/rust-vendor/pin-project-lite/tests/expand/naming/enum-ref.rs +17 -0
  754. data/rust-vendor/pin-project-lite/tests/expand/naming/struct-all.expanded.rs +151 -0
  755. data/rust-vendor/pin-project-lite/tests/expand/naming/struct-all.rs +16 -0
  756. data/rust-vendor/pin-project-lite/tests/expand/naming/struct-mut.expanded.rs +107 -0
  757. data/rust-vendor/pin-project-lite/tests/expand/naming/struct-mut.rs +14 -0
  758. data/rust-vendor/pin-project-lite/tests/expand/naming/struct-none.expanded.rs +107 -0
  759. data/rust-vendor/pin-project-lite/tests/expand/naming/struct-none.rs +13 -0
  760. data/rust-vendor/pin-project-lite/tests/expand/naming/struct-ref.expanded.rs +107 -0
  761. data/rust-vendor/pin-project-lite/tests/expand/naming/struct-ref.rs +14 -0
  762. data/rust-vendor/pin-project-lite/tests/expand/not_unpin/enum.expanded.rs +114 -0
  763. data/rust-vendor/pin-project-lite/tests/expand/not_unpin/enum.rs +19 -0
  764. data/rust-vendor/pin-project-lite/tests/expand/not_unpin/struct.expanded.rs +103 -0
  765. data/rust-vendor/pin-project-lite/tests/expand/not_unpin/struct.rs +16 -0
  766. data/rust-vendor/pin-project-lite/tests/expand/pinned_drop/enum.expanded.rs +128 -0
  767. data/rust-vendor/pin-project-lite/tests/expand/pinned_drop/enum.rs +23 -0
  768. data/rust-vendor/pin-project-lite/tests/expand/pinned_drop/struct.expanded.rs +117 -0
  769. data/rust-vendor/pin-project-lite/tests/expand/pinned_drop/struct.rs +18 -0
  770. data/rust-vendor/pin-project-lite/tests/expand/pub/enum.expanded.rs +118 -0
  771. data/rust-vendor/pin-project-lite/tests/expand/pub/enum.rs +18 -0
  772. data/rust-vendor/pin-project-lite/tests/expand/pub/struct.expanded.rs +107 -0
  773. data/rust-vendor/pin-project-lite/tests/expand/pub/struct.rs +13 -0
  774. data/rust-vendor/pin-project-lite/tests/expandtest.rs +10 -0
  775. data/rust-vendor/pin-project-lite/tests/include/basic.rs +81 -0
  776. data/rust-vendor/pin-project-lite/tests/proper_unpin.rs +101 -0
  777. data/rust-vendor/pin-project-lite/tests/test.rs +699 -0
  778. data/rust-vendor/pin-project-lite/tests/ui/not_unpin/conflict-unpin.rs +38 -0
  779. data/rust-vendor/pin-project-lite/tests/ui/not_unpin/conflict-unpin.stderr +50 -0
  780. data/rust-vendor/pin-project-lite/tests/ui/not_unpin/negative_impls_stable.rs +22 -0
  781. data/rust-vendor/pin-project-lite/tests/ui/not_unpin/negative_impls_stable.stderr +16 -0
  782. data/rust-vendor/pin-project-lite/tests/ui/pin_project/conflict-drop.rs +17 -0
  783. data/rust-vendor/pin-project-lite/tests/ui/pin_project/conflict-drop.stderr +15 -0
  784. data/rust-vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs +66 -0
  785. data/rust-vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr +81 -0
  786. data/rust-vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs +95 -0
  787. data/rust-vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.stderr +512 -0
  788. data/rust-vendor/pin-project-lite/tests/ui/pin_project/invalid.rs +27 -0
  789. data/rust-vendor/pin-project-lite/tests/ui/pin_project/invalid.stderr +47 -0
  790. data/rust-vendor/pin-project-lite/tests/ui/pin_project/negative_impls_stable.rs +21 -0
  791. data/rust-vendor/pin-project-lite/tests/ui/pin_project/negative_impls_stable.stderr +15 -0
  792. data/rust-vendor/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.rs +12 -0
  793. data/rust-vendor/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.stderr +75 -0
  794. data/rust-vendor/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.rs +22 -0
  795. data/rust-vendor/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.stderr +34 -0
  796. data/rust-vendor/pin-project-lite/tests/ui/pin_project/packed.rs +21 -0
  797. data/rust-vendor/pin-project-lite/tests/ui/pin_project/packed.stderr +95 -0
  798. data/rust-vendor/pin-project-lite/tests/ui/pin_project/unpin_sneaky.rs +14 -0
  799. data/rust-vendor/pin-project-lite/tests/ui/pin_project/unpin_sneaky.stderr +5 -0
  800. data/rust-vendor/pin-project-lite/tests/ui/pin_project/unsupported.rs +29 -0
  801. data/rust-vendor/pin-project-lite/tests/ui/pin_project/unsupported.stderr +111 -0
  802. data/rust-vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.rs +19 -0
  803. data/rust-vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr +22 -0
  804. data/rust-vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.rs +28 -0
  805. data/rust-vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr +34 -0
  806. data/rust-vendor/regex-syntax/.cargo-checksum.json +1 -1
  807. data/rust-vendor/regex-syntax/.cargo_vcs_info.json +1 -1
  808. data/rust-vendor/regex-syntax/Cargo.lock +1 -1
  809. data/rust-vendor/regex-syntax/Cargo.toml +6 -1
  810. data/rust-vendor/regex-syntax/Cargo.toml.orig +1 -1
  811. data/rust-vendor/regex-syntax/benches/bench.rs +63 -0
  812. data/rust-vendor/regex-syntax/src/hir/translate.rs +6 -2
  813. data/rust-vendor/rgb/.cargo-checksum.json +1 -1
  814. data/rust-vendor/rgb/.cargo_vcs_info.json +1 -1
  815. data/rust-vendor/rgb/Cargo.lock +31 -20
  816. data/rust-vendor/rgb/Cargo.toml +1 -1
  817. data/rust-vendor/rgb/Cargo.toml.orig +1 -1
  818. data/rust-vendor/rgb/examples/example.rs +1 -12
  819. data/rust-vendor/rgb/src/as_bytes.rs +0 -21
  820. data/rust-vendor/rgb/src/formats/gray.rs +3 -2
  821. data/rust-vendor/rgb/src/legacy/alt.rs +7 -51
  822. data/rust-vendor/rgb/src/legacy/internal/convert/array.rs +0 -16
  823. data/rust-vendor/rgb/src/legacy/internal/convert/mod.rs +24 -74
  824. data/rust-vendor/rgb/src/legacy/internal/convert/tuple.rs +0 -9
  825. data/rust-vendor/rgb/src/legacy/internal/ops.rs +0 -156
  826. data/rust-vendor/rgb/src/legacy/internal/pixel.rs +8 -2
  827. data/rust-vendor/rgb/src/legacy/internal/rgb.rs +8 -61
  828. data/rust-vendor/rgb/src/legacy/internal/rgba.rs +8 -92
  829. data/rust-vendor/rgb/src/lib.rs +6 -113
  830. data/rust-vendor/rustix/.cargo-checksum.json +1 -1
  831. data/rust-vendor/rustix/.cargo_vcs_info.json +1 -1
  832. data/rust-vendor/rustix/Cargo.lock +301 -91
  833. data/rust-vendor/rustix/Cargo.toml +5 -5
  834. data/rust-vendor/rustix/Cargo.toml.orig +5 -5
  835. data/rust-vendor/rustix/README.md +4 -5
  836. data/rust-vendor/rustix/src/backend/libc/fs/makedev.rs +2 -22
  837. data/rust-vendor/rustix/src/backend/libc/fs/syscalls.rs +20 -2
  838. data/rust-vendor/rustix/src/backend/libc/fs/types.rs +16 -0
  839. data/rust-vendor/rustix/src/backend/linux_raw/arch/riscv64.rs +432 -13
  840. data/rust-vendor/rustix/src/fs/at.rs +30 -14
  841. data/rust-vendor/rustix/src/fs/mod.rs +2 -4
  842. data/rust-vendor/rustix/src/process/types.rs +23 -8
  843. data/rust-vendor/slab/.cargo-checksum.json +1 -0
  844. data/rust-vendor/slab/.cargo_vcs_info.json +6 -0
  845. data/rust-vendor/slab/CHANGELOG.md +71 -0
  846. data/rust-vendor/slab/Cargo.lock +83 -0
  847. data/rust-vendor/slab/Cargo.toml +67 -0
  848. data/rust-vendor/slab/Cargo.toml.orig +29 -0
  849. data/rust-vendor/slab/LICENSE +25 -0
  850. data/rust-vendor/slab/README.md +51 -0
  851. data/rust-vendor/slab/SECURITY.md +9 -0
  852. data/rust-vendor/slab/src/builder.rs +63 -0
  853. data/rust-vendor/slab/src/lib.rs +1653 -0
  854. data/rust-vendor/slab/src/serde.rs +62 -0
  855. data/rust-vendor/slab/tests/serde.rs +49 -0
  856. data/rust-vendor/slab/tests/slab.rs +782 -0
  857. data/rust-vendor/syn/.cargo-checksum.json +1 -1
  858. data/rust-vendor/syn/.cargo_vcs_info.json +1 -1
  859. data/rust-vendor/syn/Cargo.lock +30 -30
  860. data/rust-vendor/syn/Cargo.toml +1 -1
  861. data/rust-vendor/syn/Cargo.toml.orig +1 -1
  862. data/rust-vendor/syn/src/item.rs +3 -0
  863. data/rust-vendor/syn/src/lib.rs +1 -1
  864. data/rust-vendor/syn/tests/common/eq.rs +1 -1
  865. data/rust-vendor/tempfile/.cargo-checksum.json +1 -1
  866. data/rust-vendor/tempfile/.cargo_vcs_info.json +1 -1
  867. data/rust-vendor/tempfile/CHANGELOG.md +4 -0
  868. data/rust-vendor/tempfile/Cargo.lock +7 -7
  869. data/rust-vendor/tempfile/Cargo.toml +2 -2
  870. data/rust-vendor/tempfile/Cargo.toml.orig +2 -2
  871. data/rust-vendor/tempfile/README.md +23 -6
  872. data/rust-vendor/tempfile/src/env.rs +1 -1
  873. data/rust-vendor/tempfile/src/file/imp/unix.rs +2 -10
  874. data/rust-vendor/tempfile/src/lib.rs +1 -1
  875. data/rust-vendor/tempfile/src/util.rs +1 -1
  876. data/rust-vendor/tendril/.cargo-checksum.json +1 -1
  877. data/rust-vendor/tendril/.cargo_vcs_info.json +2 -2
  878. data/rust-vendor/tendril/Cargo.lock +642 -68
  879. data/rust-vendor/tendril/Cargo.toml +44 -16
  880. data/rust-vendor/tendril/Cargo.toml.orig +26 -15
  881. data/rust-vendor/tendril/README.md +27 -27
  882. data/rust-vendor/tendril/benches/futf.rs +63 -0
  883. data/rust-vendor/tendril/benches/tendril.rs +158 -0
  884. data/rust-vendor/tendril/examples/fuzz.rs +22 -25
  885. data/rust-vendor/tendril/src/buf32.rs +4 -9
  886. data/rust-vendor/tendril/src/fmt.rs +23 -26
  887. data/rust-vendor/tendril/src/futf.rs +504 -0
  888. data/rust-vendor/tendril/src/lib.rs +13 -13
  889. data/rust-vendor/tendril/src/stream.rs +46 -140
  890. data/rust-vendor/tendril/src/tendril.rs +56 -175
  891. data/rust-vendor/tendril/src/utf8_decode.rs +12 -14
  892. data/rust-vendor/tendril/src/util.rs +5 -9
  893. data/rust-vendor/tokio/.cargo-checksum.json +1 -0
  894. data/rust-vendor/tokio/.cargo_vcs_info.json +6 -0
  895. data/rust-vendor/tokio/CHANGELOG.md +4253 -0
  896. data/rust-vendor/tokio/Cargo.toml +934 -0
  897. data/rust-vendor/tokio/Cargo.toml.orig +189 -0
  898. data/rust-vendor/tokio/LICENSE +21 -0
  899. data/rust-vendor/tokio/README.md +255 -0
  900. data/rust-vendor/tokio/docs/reactor-refactor.md +276 -0
  901. data/rust-vendor/tokio/src/blocking.rs +63 -0
  902. data/rust-vendor/tokio/src/doc/mod.rs +47 -0
  903. data/rust-vendor/tokio/src/doc/os.rs +68 -0
  904. data/rust-vendor/tokio/src/fs/canonicalize.rs +49 -0
  905. data/rust-vendor/tokio/src/fs/copy.rs +24 -0
  906. data/rust-vendor/tokio/src/fs/create_dir.rs +50 -0
  907. data/rust-vendor/tokio/src/fs/create_dir_all.rs +51 -0
  908. data/rust-vendor/tokio/src/fs/dir_builder.rs +129 -0
  909. data/rust-vendor/tokio/src/fs/file/tests.rs +978 -0
  910. data/rust-vendor/tokio/src/fs/file.rs +995 -0
  911. data/rust-vendor/tokio/src/fs/hard_link.rs +44 -0
  912. data/rust-vendor/tokio/src/fs/metadata.rs +46 -0
  913. data/rust-vendor/tokio/src/fs/mocks.rs +176 -0
  914. data/rust-vendor/tokio/src/fs/mod.rs +324 -0
  915. data/rust-vendor/tokio/src/fs/open_options/mock_open_options.rs +39 -0
  916. data/rust-vendor/tokio/src/fs/open_options/uring_open_options.rs +128 -0
  917. data/rust-vendor/tokio/src/fs/open_options.rs +853 -0
  918. data/rust-vendor/tokio/src/fs/read.rs +77 -0
  919. data/rust-vendor/tokio/src/fs/read_dir.rs +357 -0
  920. data/rust-vendor/tokio/src/fs/read_link.rs +12 -0
  921. data/rust-vendor/tokio/src/fs/read_to_string.rs +30 -0
  922. data/rust-vendor/tokio/src/fs/read_uring.rs +134 -0
  923. data/rust-vendor/tokio/src/fs/remove_dir.rs +12 -0
  924. data/rust-vendor/tokio/src/fs/remove_dir_all.rs +14 -0
  925. data/rust-vendor/tokio/src/fs/remove_file.rs +16 -0
  926. data/rust-vendor/tokio/src/fs/rename.rs +17 -0
  927. data/rust-vendor/tokio/src/fs/set_permissions.rs +15 -0
  928. data/rust-vendor/tokio/src/fs/symlink.rs +16 -0
  929. data/rust-vendor/tokio/src/fs/symlink_dir.rs +19 -0
  930. data/rust-vendor/tokio/src/fs/symlink_file.rs +19 -0
  931. data/rust-vendor/tokio/src/fs/symlink_metadata.rs +15 -0
  932. data/rust-vendor/tokio/src/fs/try_exists.rs +28 -0
  933. data/rust-vendor/tokio/src/fs/write.rs +96 -0
  934. data/rust-vendor/tokio/src/future/block_on.rs +22 -0
  935. data/rust-vendor/tokio/src/future/maybe_done.rs +123 -0
  936. data/rust-vendor/tokio/src/future/mod.rs +28 -0
  937. data/rust-vendor/tokio/src/future/trace.rs +11 -0
  938. data/rust-vendor/tokio/src/future/try_join.rs +82 -0
  939. data/rust-vendor/tokio/src/fuzz.rs +1 -0
  940. data/rust-vendor/tokio/src/io/async_buf_read.rs +117 -0
  941. data/rust-vendor/tokio/src/io/async_fd.rs +1439 -0
  942. data/rust-vendor/tokio/src/io/async_read.rs +133 -0
  943. data/rust-vendor/tokio/src/io/async_seek.rs +96 -0
  944. data/rust-vendor/tokio/src/io/async_write.rs +403 -0
  945. data/rust-vendor/tokio/src/io/blocking.rs +306 -0
  946. data/rust-vendor/tokio/src/io/bsd/poll_aio.rs +197 -0
  947. data/rust-vendor/tokio/src/io/interest.rs +345 -0
  948. data/rust-vendor/tokio/src/io/join.rs +130 -0
  949. data/rust-vendor/tokio/src/io/mod.rs +308 -0
  950. data/rust-vendor/tokio/src/io/poll_evented.rs +297 -0
  951. data/rust-vendor/tokio/src/io/read_buf.rs +344 -0
  952. data/rust-vendor/tokio/src/io/ready.rs +322 -0
  953. data/rust-vendor/tokio/src/io/seek.rs +57 -0
  954. data/rust-vendor/tokio/src/io/split.rs +166 -0
  955. data/rust-vendor/tokio/src/io/stderr.rs +134 -0
  956. data/rust-vendor/tokio/src/io/stdin.rs +98 -0
  957. data/rust-vendor/tokio/src/io/stdio_common.rs +222 -0
  958. data/rust-vendor/tokio/src/io/stdout.rs +183 -0
  959. data/rust-vendor/tokio/src/io/uring/mod.rs +4 -0
  960. data/rust-vendor/tokio/src/io/uring/open.rs +59 -0
  961. data/rust-vendor/tokio/src/io/uring/read.rs +61 -0
  962. data/rust-vendor/tokio/src/io/uring/utils.rs +6 -0
  963. data/rust-vendor/tokio/src/io/uring/write.rs +55 -0
  964. data/rust-vendor/tokio/src/io/util/async_buf_read_ext.rs +357 -0
  965. data/rust-vendor/tokio/src/io/util/async_read_ext.rs +1454 -0
  966. data/rust-vendor/tokio/src/io/util/async_seek_ext.rs +96 -0
  967. data/rust-vendor/tokio/src/io/util/async_write_ext.rs +1332 -0
  968. data/rust-vendor/tokio/src/io/util/buf_reader.rs +311 -0
  969. data/rust-vendor/tokio/src/io/util/buf_stream.rs +207 -0
  970. data/rust-vendor/tokio/src/io/util/buf_writer.rs +310 -0
  971. data/rust-vendor/tokio/src/io/util/chain.rs +144 -0
  972. data/rust-vendor/tokio/src/io/util/copy.rs +303 -0
  973. data/rust-vendor/tokio/src/io/util/copy_bidirectional.rs +137 -0
  974. data/rust-vendor/tokio/src/io/util/copy_buf.rs +117 -0
  975. data/rust-vendor/tokio/src/io/util/empty.rs +164 -0
  976. data/rust-vendor/tokio/src/io/util/fill_buf.rs +59 -0
  977. data/rust-vendor/tokio/src/io/util/flush.rs +47 -0
  978. data/rust-vendor/tokio/src/io/util/lines.rs +145 -0
  979. data/rust-vendor/tokio/src/io/util/mem.rs +429 -0
  980. data/rust-vendor/tokio/src/io/util/mod.rs +112 -0
  981. data/rust-vendor/tokio/src/io/util/read.rs +55 -0
  982. data/rust-vendor/tokio/src/io/util/read_buf.rs +71 -0
  983. data/rust-vendor/tokio/src/io/util/read_exact.rs +69 -0
  984. data/rust-vendor/tokio/src/io/util/read_int.rs +158 -0
  985. data/rust-vendor/tokio/src/io/util/read_line.rs +119 -0
  986. data/rust-vendor/tokio/src/io/util/read_to_end.rs +143 -0
  987. data/rust-vendor/tokio/src/io/util/read_to_string.rs +78 -0
  988. data/rust-vendor/tokio/src/io/util/read_until.rs +80 -0
  989. data/rust-vendor/tokio/src/io/util/repeat.rs +74 -0
  990. data/rust-vendor/tokio/src/io/util/shutdown.rs +46 -0
  991. data/rust-vendor/tokio/src/io/util/sink.rs +94 -0
  992. data/rust-vendor/tokio/src/io/util/split.rs +121 -0
  993. data/rust-vendor/tokio/src/io/util/take.rs +138 -0
  994. data/rust-vendor/tokio/src/io/util/vec_with_initialized.rs +142 -0
  995. data/rust-vendor/tokio/src/io/util/write.rs +46 -0
  996. data/rust-vendor/tokio/src/io/util/write_all.rs +55 -0
  997. data/rust-vendor/tokio/src/io/util/write_all_buf.rs +64 -0
  998. data/rust-vendor/tokio/src/io/util/write_buf.rs +55 -0
  999. data/rust-vendor/tokio/src/io/util/write_int.rs +151 -0
  1000. data/rust-vendor/tokio/src/io/util/write_vectored.rs +47 -0
  1001. data/rust-vendor/tokio/src/lib.rs +707 -0
  1002. data/rust-vendor/tokio/src/loom/mocked.rs +85 -0
  1003. data/rust-vendor/tokio/src/loom/mod.rs +14 -0
  1004. data/rust-vendor/tokio/src/loom/std/atomic_u16.rs +47 -0
  1005. data/rust-vendor/tokio/src/loom/std/atomic_u32.rs +47 -0
  1006. data/rust-vendor/tokio/src/loom/std/atomic_u64.rs +19 -0
  1007. data/rust-vendor/tokio/src/loom/std/atomic_u64_as_mutex.rs +76 -0
  1008. data/rust-vendor/tokio/src/loom/std/atomic_u64_native.rs +4 -0
  1009. data/rust-vendor/tokio/src/loom/std/atomic_u64_static_const_new.rs +12 -0
  1010. data/rust-vendor/tokio/src/loom/std/atomic_u64_static_once_cell.rs +57 -0
  1011. data/rust-vendor/tokio/src/loom/std/atomic_usize.rs +59 -0
  1012. data/rust-vendor/tokio/src/loom/std/barrier.rs +223 -0
  1013. data/rust-vendor/tokio/src/loom/std/mod.rs +124 -0
  1014. data/rust-vendor/tokio/src/loom/std/mutex.rs +36 -0
  1015. data/rust-vendor/tokio/src/loom/std/parking_lot.rs +195 -0
  1016. data/rust-vendor/tokio/src/loom/std/rwlock.rs +48 -0
  1017. data/rust-vendor/tokio/src/loom/std/unsafe_cell.rs +18 -0
  1018. data/rust-vendor/tokio/src/macros/addr_of.rs +27 -0
  1019. data/rust-vendor/tokio/src/macros/cfg.rs +713 -0
  1020. data/rust-vendor/tokio/src/macros/join.rs +279 -0
  1021. data/rust-vendor/tokio/src/macros/loom.rs +8 -0
  1022. data/rust-vendor/tokio/src/macros/mod.rs +36 -0
  1023. data/rust-vendor/tokio/src/macros/pin.rs +144 -0
  1024. data/rust-vendor/tokio/src/macros/select.rs +1411 -0
  1025. data/rust-vendor/tokio/src/macros/support.rs +32 -0
  1026. data/rust-vendor/tokio/src/macros/thread_local.rs +18 -0
  1027. data/rust-vendor/tokio/src/macros/trace.rs +26 -0
  1028. data/rust-vendor/tokio/src/macros/try_join.rs +280 -0
  1029. data/rust-vendor/tokio/src/net/addr.rs +333 -0
  1030. data/rust-vendor/tokio/src/net/lookup_host.rs +38 -0
  1031. data/rust-vendor/tokio/src/net/mod.rs +64 -0
  1032. data/rust-vendor/tokio/src/net/tcp/listener.rs +460 -0
  1033. data/rust-vendor/tokio/src/net/tcp/mod.rs +16 -0
  1034. data/rust-vendor/tokio/src/net/tcp/socket.rs +1027 -0
  1035. data/rust-vendor/tokio/src/net/tcp/split.rs +423 -0
  1036. data/rust-vendor/tokio/src/net/tcp/split_owned.rs +507 -0
  1037. data/rust-vendor/tokio/src/net/tcp/stream.rs +1541 -0
  1038. data/rust-vendor/tokio/src/net/udp.rs +2333 -0
  1039. data/rust-vendor/tokio/src/net/unix/datagram/mod.rs +3 -0
  1040. data/rust-vendor/tokio/src/net/unix/datagram/socket.rs +1621 -0
  1041. data/rust-vendor/tokio/src/net/unix/listener.rs +247 -0
  1042. data/rust-vendor/tokio/src/net/unix/mod.rs +39 -0
  1043. data/rust-vendor/tokio/src/net/unix/pipe.rs +1442 -0
  1044. data/rust-vendor/tokio/src/net/unix/socket.rs +273 -0
  1045. data/rust-vendor/tokio/src/net/unix/socketaddr.rs +66 -0
  1046. data/rust-vendor/tokio/src/net/unix/split.rs +331 -0
  1047. data/rust-vendor/tokio/src/net/unix/split_owned.rs +419 -0
  1048. data/rust-vendor/tokio/src/net/unix/stream.rs +1095 -0
  1049. data/rust-vendor/tokio/src/net/unix/ucred.rs +332 -0
  1050. data/rust-vendor/tokio/src/net/windows/mod.rs +3 -0
  1051. data/rust-vendor/tokio/src/net/windows/named_pipe.rs +2699 -0
  1052. data/rust-vendor/tokio/src/process/kill.rs +13 -0
  1053. data/rust-vendor/tokio/src/process/mod.rs +1854 -0
  1054. data/rust-vendor/tokio/src/process/unix/mod.rs +374 -0
  1055. data/rust-vendor/tokio/src/process/unix/orphan.rs +334 -0
  1056. data/rust-vendor/tokio/src/process/unix/pidfd_reaper.rs +352 -0
  1057. data/rust-vendor/tokio/src/process/unix/reap.rs +298 -0
  1058. data/rust-vendor/tokio/src/process/windows.rs +285 -0
  1059. data/rust-vendor/tokio/src/runtime/blocking/mod.rs +26 -0
  1060. data/rust-vendor/tokio/src/runtime/blocking/pool.rs +606 -0
  1061. data/rust-vendor/tokio/src/runtime/blocking/schedule.rs +66 -0
  1062. data/rust-vendor/tokio/src/runtime/blocking/shutdown.rs +71 -0
  1063. data/rust-vendor/tokio/src/runtime/blocking/task.rs +44 -0
  1064. data/rust-vendor/tokio/src/runtime/builder.rs +1840 -0
  1065. data/rust-vendor/tokio/src/runtime/config.rs +54 -0
  1066. data/rust-vendor/tokio/src/runtime/context/blocking.rs +121 -0
  1067. data/rust-vendor/tokio/src/runtime/context/current.rs +97 -0
  1068. data/rust-vendor/tokio/src/runtime/context/runtime.rs +99 -0
  1069. data/rust-vendor/tokio/src/runtime/context/runtime_mt.rs +36 -0
  1070. data/rust-vendor/tokio/src/runtime/context/scoped.rs +56 -0
  1071. data/rust-vendor/tokio/src/runtime/context.rs +200 -0
  1072. data/rust-vendor/tokio/src/runtime/driver/op.rs +207 -0
  1073. data/rust-vendor/tokio/src/runtime/driver.rs +376 -0
  1074. data/rust-vendor/tokio/src/runtime/dump.rs +340 -0
  1075. data/rust-vendor/tokio/src/runtime/handle.rs +710 -0
  1076. data/rust-vendor/tokio/src/runtime/id.rs +42 -0
  1077. data/rust-vendor/tokio/src/runtime/io/driver/signal.rs +22 -0
  1078. data/rust-vendor/tokio/src/runtime/io/driver/uring.rs +294 -0
  1079. data/rust-vendor/tokio/src/runtime/io/driver.rs +333 -0
  1080. data/rust-vendor/tokio/src/runtime/io/metrics.rs +24 -0
  1081. data/rust-vendor/tokio/src/runtime/io/mod.rs +22 -0
  1082. data/rust-vendor/tokio/src/runtime/io/registration.rs +259 -0
  1083. data/rust-vendor/tokio/src/runtime/io/registration_set.rs +149 -0
  1084. data/rust-vendor/tokio/src/runtime/io/scheduled_io.rs +582 -0
  1085. data/rust-vendor/tokio/src/runtime/local_runtime/mod.rs +7 -0
  1086. data/rust-vendor/tokio/src/runtime/local_runtime/options.rs +18 -0
  1087. data/rust-vendor/tokio/src/runtime/local_runtime/runtime.rs +397 -0
  1088. data/rust-vendor/tokio/src/runtime/metrics/batch.rs +303 -0
  1089. data/rust-vendor/tokio/src/runtime/metrics/histogram/h2_histogram.rs +526 -0
  1090. data/rust-vendor/tokio/src/runtime/metrics/histogram.rs +629 -0
  1091. data/rust-vendor/tokio/src/runtime/metrics/io.rs +25 -0
  1092. data/rust-vendor/tokio/src/runtime/metrics/mock.rs +15 -0
  1093. data/rust-vendor/tokio/src/runtime/metrics/mod.rs +40 -0
  1094. data/rust-vendor/tokio/src/runtime/metrics/runtime.rs +1122 -0
  1095. data/rust-vendor/tokio/src/runtime/metrics/scheduler.rs +35 -0
  1096. data/rust-vendor/tokio/src/runtime/metrics/worker.rs +110 -0
  1097. data/rust-vendor/tokio/src/runtime/mod.rs +604 -0
  1098. data/rust-vendor/tokio/src/runtime/park.rs +362 -0
  1099. data/rust-vendor/tokio/src/runtime/process.rs +44 -0
  1100. data/rust-vendor/tokio/src/runtime/runtime.rs +515 -0
  1101. data/rust-vendor/tokio/src/runtime/scheduler/block_in_place.rs +9 -0
  1102. data/rust-vendor/tokio/src/runtime/scheduler/current_thread/mod.rs +861 -0
  1103. data/rust-vendor/tokio/src/runtime/scheduler/defer.rs +43 -0
  1104. data/rust-vendor/tokio/src/runtime/scheduler/inject/metrics.rs +7 -0
  1105. data/rust-vendor/tokio/src/runtime/scheduler/inject/pop.rs +55 -0
  1106. data/rust-vendor/tokio/src/runtime/scheduler/inject/rt_multi_thread.rs +122 -0
  1107. data/rust-vendor/tokio/src/runtime/scheduler/inject/shared.rs +121 -0
  1108. data/rust-vendor/tokio/src/runtime/scheduler/inject/synced.rs +37 -0
  1109. data/rust-vendor/tokio/src/runtime/scheduler/inject.rs +70 -0
  1110. data/rust-vendor/tokio/src/runtime/scheduler/lock.rs +6 -0
  1111. data/rust-vendor/tokio/src/runtime/scheduler/mod.rs +338 -0
  1112. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/counters.rs +62 -0
  1113. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/handle/metrics.rs +55 -0
  1114. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/handle/taskdump.rs +26 -0
  1115. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/handle.rs +132 -0
  1116. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/idle.rs +240 -0
  1117. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/mod.rs +105 -0
  1118. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/overflow.rs +26 -0
  1119. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/park.rs +300 -0
  1120. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/queue.rs +599 -0
  1121. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/stats.rs +137 -0
  1122. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/trace.rs +61 -0
  1123. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/trace_mock.rs +11 -0
  1124. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker/metrics.rs +15 -0
  1125. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker/taskdump.rs +79 -0
  1126. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker/taskdump_mock.rs +7 -0
  1127. data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker.rs +1497 -0
  1128. data/rust-vendor/tokio/src/runtime/scheduler/util/mod.rs +2 -0
  1129. data/rust-vendor/tokio/src/runtime/scheduler/util/time_alt.rs +179 -0
  1130. data/rust-vendor/tokio/src/runtime/signal/mod.rs +143 -0
  1131. data/rust-vendor/tokio/src/runtime/task/abort.rs +105 -0
  1132. data/rust-vendor/tokio/src/runtime/task/core.rs +570 -0
  1133. data/rust-vendor/tokio/src/runtime/task/error.rs +198 -0
  1134. data/rust-vendor/tokio/src/runtime/task/harness.rs +567 -0
  1135. data/rust-vendor/tokio/src/runtime/task/id.rs +92 -0
  1136. data/rust-vendor/tokio/src/runtime/task/join.rs +373 -0
  1137. data/rust-vendor/tokio/src/runtime/task/list.rs +368 -0
  1138. data/rust-vendor/tokio/src/runtime/task/mod.rs +670 -0
  1139. data/rust-vendor/tokio/src/runtime/task/raw.rs +378 -0
  1140. data/rust-vendor/tokio/src/runtime/task/state.rs +662 -0
  1141. data/rust-vendor/tokio/src/runtime/task/trace/mod.rs +364 -0
  1142. data/rust-vendor/tokio/src/runtime/task/trace/symbol.rs +92 -0
  1143. data/rust-vendor/tokio/src/runtime/task/trace/tree.rs +126 -0
  1144. data/rust-vendor/tokio/src/runtime/task/waker.rs +124 -0
  1145. data/rust-vendor/tokio/src/runtime/task_hooks.rs +83 -0
  1146. data/rust-vendor/tokio/src/runtime/tests/inject.rs +54 -0
  1147. data/rust-vendor/tokio/src/runtime/tests/loom_blocking.rs +102 -0
  1148. data/rust-vendor/tokio/src/runtime/tests/loom_current_thread/yield_now.rs +30 -0
  1149. data/rust-vendor/tokio/src/runtime/tests/loom_current_thread.rs +198 -0
  1150. data/rust-vendor/tokio/src/runtime/tests/loom_join_set.rs +82 -0
  1151. data/rust-vendor/tokio/src/runtime/tests/loom_local.rs +47 -0
  1152. data/rust-vendor/tokio/src/runtime/tests/loom_multi_thread/queue.rs +205 -0
  1153. data/rust-vendor/tokio/src/runtime/tests/loom_multi_thread/shutdown.rs +28 -0
  1154. data/rust-vendor/tokio/src/runtime/tests/loom_multi_thread/yield_now.rs +37 -0
  1155. data/rust-vendor/tokio/src/runtime/tests/loom_multi_thread.rs +461 -0
  1156. data/rust-vendor/tokio/src/runtime/tests/loom_oneshot.rs +48 -0
  1157. data/rust-vendor/tokio/src/runtime/tests/mod.rs +85 -0
  1158. data/rust-vendor/tokio/src/runtime/tests/queue.rs +273 -0
  1159. data/rust-vendor/tokio/src/runtime/tests/task.rs +469 -0
  1160. data/rust-vendor/tokio/src/runtime/tests/task_combinations.rs +488 -0
  1161. data/rust-vendor/tokio/src/runtime/thread_id.rs +31 -0
  1162. data/rust-vendor/tokio/src/runtime/time/entry.rs +693 -0
  1163. data/rust-vendor/tokio/src/runtime/time/handle.rs +68 -0
  1164. data/rust-vendor/tokio/src/runtime/time/mod.rs +493 -0
  1165. data/rust-vendor/tokio/src/runtime/time/source.rs +45 -0
  1166. data/rust-vendor/tokio/src/runtime/time/tests/mod.rs +269 -0
  1167. data/rust-vendor/tokio/src/runtime/time/wheel/level.rs +192 -0
  1168. data/rust-vendor/tokio/src/runtime/time/wheel/mod.rs +331 -0
  1169. data/rust-vendor/tokio/src/runtime/time_alt/cancellation_queue/tests.rs +97 -0
  1170. data/rust-vendor/tokio/src/runtime/time_alt/cancellation_queue.rs +92 -0
  1171. data/rust-vendor/tokio/src/runtime/time_alt/context.rs +47 -0
  1172. data/rust-vendor/tokio/src/runtime/time_alt/entry.rs +276 -0
  1173. data/rust-vendor/tokio/src/runtime/time_alt/mod.rs +24 -0
  1174. data/rust-vendor/tokio/src/runtime/time_alt/registration_queue/tests.rs +53 -0
  1175. data/rust-vendor/tokio/src/runtime/time_alt/registration_queue.rs +43 -0
  1176. data/rust-vendor/tokio/src/runtime/time_alt/tests.rs +168 -0
  1177. data/rust-vendor/tokio/src/runtime/time_alt/timer.rs +169 -0
  1178. data/rust-vendor/tokio/src/runtime/time_alt/wake_queue/tests.rs +66 -0
  1179. data/rust-vendor/tokio/src/runtime/time_alt/wake_queue.rs +50 -0
  1180. data/rust-vendor/tokio/src/runtime/time_alt/wheel/level.rs +194 -0
  1181. data/rust-vendor/tokio/src/runtime/time_alt/wheel/mod.rs +272 -0
  1182. data/rust-vendor/tokio/src/signal/ctrl_c.rs +62 -0
  1183. data/rust-vendor/tokio/src/signal/mod.rs +100 -0
  1184. data/rust-vendor/tokio/src/signal/registry.rs +275 -0
  1185. data/rust-vendor/tokio/src/signal/reusable_box.rs +230 -0
  1186. data/rust-vendor/tokio/src/signal/unix.rs +570 -0
  1187. data/rust-vendor/tokio/src/signal/windows/stub.rs +25 -0
  1188. data/rust-vendor/tokio/src/signal/windows/sys.rs +244 -0
  1189. data/rust-vendor/tokio/src/signal/windows.rs +526 -0
  1190. data/rust-vendor/tokio/src/sync/barrier.rs +213 -0
  1191. data/rust-vendor/tokio/src/sync/batch_semaphore.rs +780 -0
  1192. data/rust-vendor/tokio/src/sync/broadcast.rs +1759 -0
  1193. data/rust-vendor/tokio/src/sync/mod.rs +524 -0
  1194. data/rust-vendor/tokio/src/sync/mpsc/block.rs +477 -0
  1195. data/rust-vendor/tokio/src/sync/mpsc/bounded.rs +1949 -0
  1196. data/rust-vendor/tokio/src/sync/mpsc/chan.rs +628 -0
  1197. data/rust-vendor/tokio/src/sync/mpsc/error.rs +168 -0
  1198. data/rust-vendor/tokio/src/sync/mpsc/list.rs +419 -0
  1199. data/rust-vendor/tokio/src/sync/mpsc/mod.rs +144 -0
  1200. data/rust-vendor/tokio/src/sync/mpsc/unbounded.rs +726 -0
  1201. data/rust-vendor/tokio/src/sync/mutex.rs +1396 -0
  1202. data/rust-vendor/tokio/src/sync/notify.rs +1409 -0
  1203. data/rust-vendor/tokio/src/sync/once_cell.rs +512 -0
  1204. data/rust-vendor/tokio/src/sync/oneshot.rs +1594 -0
  1205. data/rust-vendor/tokio/src/sync/rwlock/owned_read_guard.rs +208 -0
  1206. data/rust-vendor/tokio/src/sync/rwlock/owned_write_guard.rs +460 -0
  1207. data/rust-vendor/tokio/src/sync/rwlock/owned_write_guard_mapped.rs +230 -0
  1208. data/rust-vendor/tokio/src/sync/rwlock/read_guard.rs +191 -0
  1209. data/rust-vendor/tokio/src/sync/rwlock/write_guard.rs +457 -0
  1210. data/rust-vendor/tokio/src/sync/rwlock/write_guard_mapped.rs +213 -0
  1211. data/rust-vendor/tokio/src/sync/rwlock.rs +1121 -0
  1212. data/rust-vendor/tokio/src/sync/semaphore.rs +1206 -0
  1213. data/rust-vendor/tokio/src/sync/set_once.rs +388 -0
  1214. data/rust-vendor/tokio/src/sync/task/atomic_waker.rs +383 -0
  1215. data/rust-vendor/tokio/src/sync/task/mod.rs +4 -0
  1216. data/rust-vendor/tokio/src/sync/tests/atomic_waker.rs +113 -0
  1217. data/rust-vendor/tokio/src/sync/tests/loom_atomic_waker.rs +100 -0
  1218. data/rust-vendor/tokio/src/sync/tests/loom_broadcast.rs +207 -0
  1219. data/rust-vendor/tokio/src/sync/tests/loom_list.rs +48 -0
  1220. data/rust-vendor/tokio/src/sync/tests/loom_mpsc.rs +224 -0
  1221. data/rust-vendor/tokio/src/sync/tests/loom_notify.rs +330 -0
  1222. data/rust-vendor/tokio/src/sync/tests/loom_oneshot.rs +187 -0
  1223. data/rust-vendor/tokio/src/sync/tests/loom_rwlock.rs +105 -0
  1224. data/rust-vendor/tokio/src/sync/tests/loom_semaphore_batch.rs +242 -0
  1225. data/rust-vendor/tokio/src/sync/tests/loom_set_once.rs +72 -0
  1226. data/rust-vendor/tokio/src/sync/tests/loom_watch.rs +110 -0
  1227. data/rust-vendor/tokio/src/sync/tests/mod.rs +18 -0
  1228. data/rust-vendor/tokio/src/sync/tests/notify.rs +121 -0
  1229. data/rust-vendor/tokio/src/sync/tests/semaphore_batch.rs +310 -0
  1230. data/rust-vendor/tokio/src/sync/watch.rs +1556 -0
  1231. data/rust-vendor/tokio/src/task/blocking.rs +212 -0
  1232. data/rust-vendor/tokio/src/task/builder.rs +235 -0
  1233. data/rust-vendor/tokio/src/task/coop/consume_budget.rs +39 -0
  1234. data/rust-vendor/tokio/src/task/coop/mod.rs +573 -0
  1235. data/rust-vendor/tokio/src/task/coop/unconstrained.rs +45 -0
  1236. data/rust-vendor/tokio/src/task/join_set.rs +851 -0
  1237. data/rust-vendor/tokio/src/task/local.rs +1353 -0
  1238. data/rust-vendor/tokio/src/task/mod.rs +335 -0
  1239. data/rust-vendor/tokio/src/task/spawn.rs +210 -0
  1240. data/rust-vendor/tokio/src/task/task_local.rs +488 -0
  1241. data/rust-vendor/tokio/src/task/yield_now.rs +64 -0
  1242. data/rust-vendor/tokio/src/time/clock.rs +320 -0
  1243. data/rust-vendor/tokio/src/time/error.rs +123 -0
  1244. data/rust-vendor/tokio/src/time/instant.rs +223 -0
  1245. data/rust-vendor/tokio/src/time/interval.rs +643 -0
  1246. data/rust-vendor/tokio/src/time/mod.rs +110 -0
  1247. data/rust-vendor/tokio/src/time/sleep.rs +469 -0
  1248. data/rust-vendor/tokio/src/time/timeout.rs +234 -0
  1249. data/rust-vendor/tokio/src/util/as_ref.rs +38 -0
  1250. data/rust-vendor/tokio/src/util/atomic_cell.rs +51 -0
  1251. data/rust-vendor/tokio/src/util/bit.rs +64 -0
  1252. data/rust-vendor/tokio/src/util/blocking_check.rs +29 -0
  1253. data/rust-vendor/tokio/src/util/cacheline.rs +89 -0
  1254. data/rust-vendor/tokio/src/util/error.rs +16 -0
  1255. data/rust-vendor/tokio/src/util/idle_notified_set.rs +512 -0
  1256. data/rust-vendor/tokio/src/util/linked_list.rs +808 -0
  1257. data/rust-vendor/tokio/src/util/markers.rs +9 -0
  1258. data/rust-vendor/tokio/src/util/memchr.rs +74 -0
  1259. data/rust-vendor/tokio/src/util/metric_atomics.rs +81 -0
  1260. data/rust-vendor/tokio/src/util/mod.rs +110 -0
  1261. data/rust-vendor/tokio/src/util/ptr_expose.rs +74 -0
  1262. data/rust-vendor/tokio/src/util/rand/rt.rs +61 -0
  1263. data/rust-vendor/tokio/src/util/rand/rt_unstable.rs +20 -0
  1264. data/rust-vendor/tokio/src/util/rand.rs +95 -0
  1265. data/rust-vendor/tokio/src/util/rc_cell.rs +57 -0
  1266. data/rust-vendor/tokio/src/util/sharded_list.rs +162 -0
  1267. data/rust-vendor/tokio/src/util/sync_wrapper.rs +37 -0
  1268. data/rust-vendor/tokio/src/util/trace.rs +191 -0
  1269. data/rust-vendor/tokio/src/util/try_lock.rs +80 -0
  1270. data/rust-vendor/tokio/src/util/typeid.rs +45 -0
  1271. data/rust-vendor/tokio/src/util/wake.rs +78 -0
  1272. data/rust-vendor/tokio/src/util/wake_list.rs +83 -0
  1273. data/rust-vendor/tokio/tests/_require_full.rs +8 -0
  1274. data/rust-vendor/tokio/tests/async_send_sync.rs +778 -0
  1275. data/rust-vendor/tokio/tests/buffered.rs +51 -0
  1276. data/rust-vendor/tokio/tests/coop_budget.rs +93 -0
  1277. data/rust-vendor/tokio/tests/dump.rs +199 -0
  1278. data/rust-vendor/tokio/tests/duplex_stream.rs +47 -0
  1279. data/rust-vendor/tokio/tests/fs.rs +36 -0
  1280. data/rust-vendor/tokio/tests/fs_canonicalize_dir.rs +22 -0
  1281. data/rust-vendor/tokio/tests/fs_copy.rs +41 -0
  1282. data/rust-vendor/tokio/tests/fs_dir.rs +126 -0
  1283. data/rust-vendor/tokio/tests/fs_file.rs +289 -0
  1284. data/rust-vendor/tokio/tests/fs_link.rs +62 -0
  1285. data/rust-vendor/tokio/tests/fs_open_options.rs +84 -0
  1286. data/rust-vendor/tokio/tests/fs_open_options_windows.rs +51 -0
  1287. data/rust-vendor/tokio/tests/fs_remove_dir_all.rs +31 -0
  1288. data/rust-vendor/tokio/tests/fs_remove_file.rs +24 -0
  1289. data/rust-vendor/tokio/tests/fs_rename.rs +28 -0
  1290. data/rust-vendor/tokio/tests/fs_symlink_dir_windows.rs +31 -0
  1291. data/rust-vendor/tokio/tests/fs_symlink_file_windows.rs +24 -0
  1292. data/rust-vendor/tokio/tests/fs_try_exists.rs +48 -0
  1293. data/rust-vendor/tokio/tests/fs_uring.rs +157 -0
  1294. data/rust-vendor/tokio/tests/fs_uring_read.rs +202 -0
  1295. data/rust-vendor/tokio/tests/fs_write.rs +16 -0
  1296. data/rust-vendor/tokio/tests/io_async_fd.rs +958 -0
  1297. data/rust-vendor/tokio/tests/io_async_read.rs +10 -0
  1298. data/rust-vendor/tokio/tests/io_buf_reader.rs +379 -0
  1299. data/rust-vendor/tokio/tests/io_buf_writer.rs +537 -0
  1300. data/rust-vendor/tokio/tests/io_chain.rs +16 -0
  1301. data/rust-vendor/tokio/tests/io_copy.rs +101 -0
  1302. data/rust-vendor/tokio/tests/io_copy_bidirectional.rs +168 -0
  1303. data/rust-vendor/tokio/tests/io_driver.rs +105 -0
  1304. data/rust-vendor/tokio/tests/io_driver_drop.rs +62 -0
  1305. data/rust-vendor/tokio/tests/io_fill_buf.rs +34 -0
  1306. data/rust-vendor/tokio/tests/io_join.rs +81 -0
  1307. data/rust-vendor/tokio/tests/io_lines.rs +19 -0
  1308. data/rust-vendor/tokio/tests/io_mem_stream.rs +121 -0
  1309. data/rust-vendor/tokio/tests/io_panic.rs +222 -0
  1310. data/rust-vendor/tokio/tests/io_poll_aio.rs +339 -0
  1311. data/rust-vendor/tokio/tests/io_read.rs +75 -0
  1312. data/rust-vendor/tokio/tests/io_read_buf.rs +94 -0
  1313. data/rust-vendor/tokio/tests/io_read_exact.rs +15 -0
  1314. data/rust-vendor/tokio/tests/io_read_line.rs +107 -0
  1315. data/rust-vendor/tokio/tests/io_read_to_end.rs +125 -0
  1316. data/rust-vendor/tokio/tests/io_read_to_string.rs +63 -0
  1317. data/rust-vendor/tokio/tests/io_read_until.rs +74 -0
  1318. data/rust-vendor/tokio/tests/io_repeat.rs +18 -0
  1319. data/rust-vendor/tokio/tests/io_sink.rs +44 -0
  1320. data/rust-vendor/tokio/tests/io_split.rs +114 -0
  1321. data/rust-vendor/tokio/tests/io_take.rs +74 -0
  1322. data/rust-vendor/tokio/tests/io_util_empty.rs +61 -0
  1323. data/rust-vendor/tokio/tests/io_write.rs +58 -0
  1324. data/rust-vendor/tokio/tests/io_write_all.rs +51 -0
  1325. data/rust-vendor/tokio/tests/io_write_all_buf.rs +145 -0
  1326. data/rust-vendor/tokio/tests/io_write_buf.rs +56 -0
  1327. data/rust-vendor/tokio/tests/io_write_int.rs +37 -0
  1328. data/rust-vendor/tokio/tests/join_handle_panic.rs +21 -0
  1329. data/rust-vendor/tokio/tests/macros_join.rs +256 -0
  1330. data/rust-vendor/tokio/tests/macros_pin.rs +21 -0
  1331. data/rust-vendor/tokio/tests/macros_rename_test.rs +35 -0
  1332. data/rust-vendor/tokio/tests/macros_select.rs +760 -0
  1333. data/rust-vendor/tokio/tests/macros_test.rs +117 -0
  1334. data/rust-vendor/tokio/tests/macros_try_join.rs +269 -0
  1335. data/rust-vendor/tokio/tests/net_bind_resource.rs +14 -0
  1336. data/rust-vendor/tokio/tests/net_lookup_host.rs +39 -0
  1337. data/rust-vendor/tokio/tests/net_named_pipe.rs +399 -0
  1338. data/rust-vendor/tokio/tests/net_panic.rs +196 -0
  1339. data/rust-vendor/tokio/tests/net_quickack.rs +71 -0
  1340. data/rust-vendor/tokio/tests/net_unix_pipe.rs +546 -0
  1341. data/rust-vendor/tokio/tests/no_rt.rs +47 -0
  1342. data/rust-vendor/tokio/tests/process_arg0.rs +13 -0
  1343. data/rust-vendor/tokio/tests/process_change_of_runtime.rs +34 -0
  1344. data/rust-vendor/tokio/tests/process_issue_2174.rs +46 -0
  1345. data/rust-vendor/tokio/tests/process_issue_42.rs +39 -0
  1346. data/rust-vendor/tokio/tests/process_issue_7144.rs +28 -0
  1347. data/rust-vendor/tokio/tests/process_kill_after_wait.rs +27 -0
  1348. data/rust-vendor/tokio/tests/process_kill_on_drop.rs +44 -0
  1349. data/rust-vendor/tokio/tests/process_raw_handle.rs +24 -0
  1350. data/rust-vendor/tokio/tests/process_smoke.rs +34 -0
  1351. data/rust-vendor/tokio/tests/rt_basic.rs +458 -0
  1352. data/rust-vendor/tokio/tests/rt_common.rs +1438 -0
  1353. data/rust-vendor/tokio/tests/rt_handle.rs +125 -0
  1354. data/rust-vendor/tokio/tests/rt_handle_block_on.rs +567 -0
  1355. data/rust-vendor/tokio/tests/rt_local.rs +170 -0
  1356. data/rust-vendor/tokio/tests/rt_metrics.rs +233 -0
  1357. data/rust-vendor/tokio/tests/rt_panic.rs +90 -0
  1358. data/rust-vendor/tokio/tests/rt_poll_callbacks.rs +128 -0
  1359. data/rust-vendor/tokio/tests/rt_threaded.rs +884 -0
  1360. data/rust-vendor/tokio/tests/rt_time_start_paused.rs +14 -0
  1361. data/rust-vendor/tokio/tests/rt_unstable_metrics.rs +821 -0
  1362. data/rust-vendor/tokio/tests/signal_ctrl_c.rs +23 -0
  1363. data/rust-vendor/tokio/tests/signal_drop_recv.rs +23 -0
  1364. data/rust-vendor/tokio/tests/signal_drop_rt.rs +45 -0
  1365. data/rust-vendor/tokio/tests/signal_drop_signal.rs +27 -0
  1366. data/rust-vendor/tokio/tests/signal_info.rs +35 -0
  1367. data/rust-vendor/tokio/tests/signal_multi_rt.rs +55 -0
  1368. data/rust-vendor/tokio/tests/signal_no_rt.rs +13 -0
  1369. data/rust-vendor/tokio/tests/signal_notify_both.rs +24 -0
  1370. data/rust-vendor/tokio/tests/signal_panic.rs +31 -0
  1371. data/rust-vendor/tokio/tests/signal_realtime.rs +105 -0
  1372. data/rust-vendor/tokio/tests/signal_twice.rs +23 -0
  1373. data/rust-vendor/tokio/tests/signal_usr1.rs +24 -0
  1374. data/rust-vendor/tokio/tests/support/io_vec.rs +45 -0
  1375. data/rust-vendor/tokio/tests/support/leaked_buffers.rs +26 -0
  1376. data/rust-vendor/tokio/tests/support/mpsc_stream.rs +42 -0
  1377. data/rust-vendor/tokio/tests/support/panic.rs +34 -0
  1378. data/rust-vendor/tokio/tests/support/signal.rs +15 -0
  1379. data/rust-vendor/tokio/tests/sync_barrier.rs +99 -0
  1380. data/rust-vendor/tokio/tests/sync_broadcast.rs +722 -0
  1381. data/rust-vendor/tokio/tests/sync_broadcast_weak.rs +181 -0
  1382. data/rust-vendor/tokio/tests/sync_errors.rs +30 -0
  1383. data/rust-vendor/tokio/tests/sync_mpsc.rs +1512 -0
  1384. data/rust-vendor/tokio/tests/sync_mpsc_weak.rs +688 -0
  1385. data/rust-vendor/tokio/tests/sync_mutex.rs +178 -0
  1386. data/rust-vendor/tokio/tests/sync_mutex_owned.rs +137 -0
  1387. data/rust-vendor/tokio/tests/sync_notify.rs +303 -0
  1388. data/rust-vendor/tokio/tests/sync_notify_owned.rs +304 -0
  1389. data/rust-vendor/tokio/tests/sync_once_cell.rs +250 -0
  1390. data/rust-vendor/tokio/tests/sync_oneshot.rs +440 -0
  1391. data/rust-vendor/tokio/tests/sync_panic.rs +231 -0
  1392. data/rust-vendor/tokio/tests/sync_rwlock.rs +332 -0
  1393. data/rust-vendor/tokio/tests/sync_semaphore.rs +176 -0
  1394. data/rust-vendor/tokio/tests/sync_semaphore_owned.rs +164 -0
  1395. data/rust-vendor/tokio/tests/sync_set_once.rs +180 -0
  1396. data/rust-vendor/tokio/tests/sync_watch.rs +505 -0
  1397. data/rust-vendor/tokio/tests/task_abort.rs +326 -0
  1398. data/rust-vendor/tokio/tests/task_blocking.rs +310 -0
  1399. data/rust-vendor/tokio/tests/task_builder.rs +105 -0
  1400. data/rust-vendor/tokio/tests/task_hooks.rs +194 -0
  1401. data/rust-vendor/tokio/tests/task_id.rs +300 -0
  1402. data/rust-vendor/tokio/tests/task_join_set.rs +662 -0
  1403. data/rust-vendor/tokio/tests/task_local.rs +171 -0
  1404. data/rust-vendor/tokio/tests/task_local_set.rs +808 -0
  1405. data/rust-vendor/tokio/tests/task_panic.rs +123 -0
  1406. data/rust-vendor/tokio/tests/task_trace_self.rs +107 -0
  1407. data/rust-vendor/tokio/tests/task_yield_now.rs +24 -0
  1408. data/rust-vendor/tokio/tests/tcp_accept.rs +157 -0
  1409. data/rust-vendor/tokio/tests/tcp_connect.rs +231 -0
  1410. data/rust-vendor/tokio/tests/tcp_echo.rs +43 -0
  1411. data/rust-vendor/tokio/tests/tcp_into_split.rs +132 -0
  1412. data/rust-vendor/tokio/tests/tcp_into_std.rs +46 -0
  1413. data/rust-vendor/tokio/tests/tcp_peek.rs +37 -0
  1414. data/rust-vendor/tokio/tests/tcp_shutdown.rs +83 -0
  1415. data/rust-vendor/tokio/tests/tcp_socket.rs +185 -0
  1416. data/rust-vendor/tokio/tests/tcp_split.rs +43 -0
  1417. data/rust-vendor/tokio/tests/tcp_stream.rs +407 -0
  1418. data/rust-vendor/tokio/tests/test_clock.rs +50 -0
  1419. data/rust-vendor/tokio/tests/time_alt.rs +108 -0
  1420. data/rust-vendor/tokio/tests/time_interval.rs +477 -0
  1421. data/rust-vendor/tokio/tests/time_panic.rs +139 -0
  1422. data/rust-vendor/tokio/tests/time_pause.rs +333 -0
  1423. data/rust-vendor/tokio/tests/time_rt.rs +166 -0
  1424. data/rust-vendor/tokio/tests/time_sleep.rs +366 -0
  1425. data/rust-vendor/tokio/tests/time_timeout.rs +151 -0
  1426. data/rust-vendor/tokio/tests/time_wasm.rs +40 -0
  1427. data/rust-vendor/tokio/tests/tracing_sync.rs +282 -0
  1428. data/rust-vendor/tokio/tests/tracing_task.rs +186 -0
  1429. data/rust-vendor/tokio/tests/tracing_time.rs +71 -0
  1430. data/rust-vendor/tokio/tests/udp.rs +724 -0
  1431. data/rust-vendor/tokio/tests/uds_cred.rs +26 -0
  1432. data/rust-vendor/tokio/tests/uds_datagram.rs +425 -0
  1433. data/rust-vendor/tokio/tests/uds_socket.rs +121 -0
  1434. data/rust-vendor/tokio/tests/uds_split.rs +44 -0
  1435. data/rust-vendor/tokio/tests/uds_stream.rs +446 -0
  1436. data/rust-vendor/tokio/tests/unwindsafe.rs +42 -0
  1437. data/rust-vendor/wasip2/.cargo-checksum.json +1 -1
  1438. data/rust-vendor/wasip2/.cargo_vcs_info.json +1 -1
  1439. data/rust-vendor/wasip2/Cargo.lock +9 -9
  1440. data/rust-vendor/wasip2/Cargo.toml +3 -3
  1441. data/rust-vendor/wasip2/Cargo.toml.orig +1 -1
  1442. data/rust-vendor/wasip2/src/command.rs +95 -95
  1443. data/rust-vendor/wasip2/src/imports.rs +283 -296
  1444. data/rust-vendor/wasip2/src/proxy.rs +846 -842
  1445. data/rust-vendor/wasip2/wit/deps/cli.wit +233 -0
  1446. data/rust-vendor/wasip2/wit/deps/clocks.wit +162 -0
  1447. data/rust-vendor/wasip2/wit/deps/filesystem.wit +587 -0
  1448. data/rust-vendor/wasip2/wit/deps/http.wit +733 -0
  1449. data/rust-vendor/wasip2/wit/deps/io.wit +299 -0
  1450. data/rust-vendor/wasip2/wit/deps/random.wit +92 -0
  1451. data/rust-vendor/wasip2/wit/deps/sockets.wit +949 -0
  1452. data/rust-vendor/wasm-bindgen/.cargo-checksum.json +1 -1
  1453. data/rust-vendor/wasm-bindgen/.cargo_vcs_info.json +1 -1
  1454. data/rust-vendor/wasm-bindgen/Cargo.lock +21 -21
  1455. data/rust-vendor/wasm-bindgen/Cargo.toml +6 -3
  1456. data/rust-vendor/wasm-bindgen/Cargo.toml.orig +6 -4
  1457. data/rust-vendor/wasm-bindgen/src/cast.rs +5 -1
  1458. data/rust-vendor/wasm-bindgen/src/closure.rs +695 -245
  1459. data/rust-vendor/wasm-bindgen/src/convert/closures.rs +324 -27
  1460. data/rust-vendor/wasm-bindgen/src/convert/impls.rs +203 -5
  1461. data/rust-vendor/wasm-bindgen/src/convert/slices.rs +36 -10
  1462. data/rust-vendor/wasm-bindgen/src/convert/traits.rs +172 -1
  1463. data/rust-vendor/wasm-bindgen/src/describe.rs +2 -2
  1464. data/rust-vendor/wasm-bindgen/src/lib.rs +28 -7
  1465. data/rust-vendor/wasm-bindgen/src/rt/marker.rs +104 -0
  1466. data/rust-vendor/wasm-bindgen/src/rt/mod.rs +48 -47
  1467. data/rust-vendor/wasm-bindgen/src/sys.rs +272 -0
  1468. data/rust-vendor/wasm-bindgen-macro/.cargo-checksum.json +1 -1
  1469. data/rust-vendor/wasm-bindgen-macro/.cargo_vcs_info.json +1 -1
  1470. data/rust-vendor/wasm-bindgen-macro/Cargo.lock +27 -27
  1471. data/rust-vendor/wasm-bindgen-macro/Cargo.toml +5 -2
  1472. data/rust-vendor/wasm-bindgen-macro/Cargo.toml.orig +2 -2
  1473. data/rust-vendor/wasm-bindgen-macro-support/.cargo-checksum.json +1 -1
  1474. data/rust-vendor/wasm-bindgen-macro-support/.cargo_vcs_info.json +1 -1
  1475. data/rust-vendor/wasm-bindgen-macro-support/Cargo.lock +13 -13
  1476. data/rust-vendor/wasm-bindgen-macro-support/Cargo.toml +6 -2
  1477. data/rust-vendor/wasm-bindgen-macro-support/Cargo.toml.orig +3 -3
  1478. data/rust-vendor/wasm-bindgen-macro-support/src/ast.rs +14 -1
  1479. data/rust-vendor/wasm-bindgen-macro-support/src/codegen.rs +789 -98
  1480. data/rust-vendor/wasm-bindgen-macro-support/src/encode.rs +2 -0
  1481. data/rust-vendor/wasm-bindgen-macro-support/src/generics.rs +805 -0
  1482. data/rust-vendor/wasm-bindgen-macro-support/src/lib.rs +1 -0
  1483. data/rust-vendor/wasm-bindgen-macro-support/src/parser.rs +209 -54
  1484. data/rust-vendor/wasm-bindgen-shared/.cargo-checksum.json +1 -1
  1485. data/rust-vendor/wasm-bindgen-shared/.cargo_vcs_info.json +1 -1
  1486. data/rust-vendor/wasm-bindgen-shared/Cargo.lock +3 -3
  1487. data/rust-vendor/wasm-bindgen-shared/Cargo.toml +4 -1
  1488. data/rust-vendor/wasm-bindgen-shared/Cargo.toml.orig +1 -1
  1489. data/rust-vendor/wasm-bindgen-shared/src/lib.rs +39 -1
  1490. data/rust-vendor/wasm-bindgen-shared/src/schema_hash_approval.rs +1 -1
  1491. data/rust-vendor/zerocopy/.cargo-checksum.json +1 -1
  1492. data/rust-vendor/zerocopy/.cargo_vcs_info.json +1 -1
  1493. data/rust-vendor/zerocopy/Cargo.lock +3 -188
  1494. data/rust-vendor/zerocopy/Cargo.toml +7 -11
  1495. data/rust-vendor/zerocopy/Cargo.toml.orig +5 -10
  1496. data/rust-vendor/zerocopy/cargo.sh +2 -0
  1497. data/rust-vendor/zerocopy/ci/check_fmt.sh +7 -6
  1498. data/rust-vendor/zerocopy/ci/check_stale_stderr.sh +9 -0
  1499. data/rust-vendor/zerocopy/ci/check_todo.sh +8 -1
  1500. data/rust-vendor/zerocopy/githooks/pre-push +3 -3
  1501. data/rust-vendor/zerocopy/src/macros.rs +4 -0
  1502. data/rust-vendor/zerocopy/src/util/macro_util.rs +26 -11
  1503. data/rust-vendor/zerocopy/tests/ui/diagnostic-not-implemented.msrv.stderr +99 -0
  1504. data/rust-vendor/zerocopy/tests/ui/diagnostic-not-implemented.nightly.stderr +249 -0
  1505. data/rust-vendor/zerocopy/tests/ui/diagnostic-not-implemented.rs +83 -0
  1506. data/rust-vendor/zerocopy/tests/ui/diagnostic-not-implemented.stable.stderr +249 -0
  1507. data/rust-vendor/zerocopy/tests/ui/include_value.msrv.stderr +19 -0
  1508. data/rust-vendor/zerocopy/tests/ui/include_value.nightly.stderr +35 -0
  1509. data/rust-vendor/zerocopy/tests/ui/include_value.rs +18 -0
  1510. data/rust-vendor/zerocopy/tests/ui/include_value.stable.stderr +35 -0
  1511. data/rust-vendor/zerocopy/tests/ui/late-compile-pass.msrv.stderr +135 -0
  1512. data/rust-vendor/zerocopy/tests/ui/late-compile-pass.nightly.stderr +157 -0
  1513. data/rust-vendor/zerocopy/tests/ui/late-compile-pass.rs +79 -0
  1514. data/rust-vendor/zerocopy/tests/ui/late-compile-pass.stable.stderr +157 -0
  1515. data/rust-vendor/zerocopy/tests/ui/max-align.msrv.stderr +9 -0
  1516. data/rust-vendor/zerocopy/tests/ui/max-align.nightly.stderr +9 -0
  1517. data/rust-vendor/zerocopy/tests/ui/max-align.rs +102 -0
  1518. data/rust-vendor/zerocopy/tests/ui/max-align.stable.stderr +9 -0
  1519. data/rust-vendor/zerocopy/tests/ui/ptr-is-invariant-over-v.msrv.stderr +21 -0
  1520. data/rust-vendor/zerocopy/tests/ui/ptr-is-invariant-over-v.nightly.stderr +34 -0
  1521. data/rust-vendor/zerocopy/tests/ui/ptr-is-invariant-over-v.rs +35 -0
  1522. data/rust-vendor/zerocopy/tests/ui/ptr-is-invariant-over-v.stable.stderr +34 -0
  1523. data/rust-vendor/zerocopy/tests/ui/transmute-ptr-to-usize.msrv.stderr +19 -0
  1524. data/rust-vendor/zerocopy/tests/ui/transmute-ptr-to-usize.nightly.stderr +33 -0
  1525. data/rust-vendor/zerocopy/tests/ui/transmute-ptr-to-usize.rs +22 -0
  1526. data/rust-vendor/zerocopy/tests/ui/transmute-ptr-to-usize.stable.stderr +28 -0
  1527. data/rust-vendor/zerocopy/tests/ui/transmute.msrv.stderr +35 -0
  1528. data/rust-vendor/zerocopy/tests/ui/transmute.nightly.stderr +70 -0
  1529. data/rust-vendor/zerocopy/tests/ui/transmute.rs +22 -0
  1530. data/rust-vendor/zerocopy/tests/ui/transmute.stable.stderr +70 -0
  1531. data/rust-vendor/zerocopy/tests/ui/transmute_mut.msrv.stderr +111 -0
  1532. data/rust-vendor/zerocopy/tests/ui/transmute_mut.nightly.stderr +213 -0
  1533. data/rust-vendor/zerocopy/tests/ui/transmute_mut.rs +89 -0
  1534. data/rust-vendor/zerocopy/tests/ui/transmute_mut.stable.stderr +213 -0
  1535. data/rust-vendor/zerocopy/tests/ui/transmute_ref.msrv.stderr +245 -0
  1536. data/rust-vendor/zerocopy/tests/ui/transmute_ref.nightly.stderr +359 -0
  1537. data/rust-vendor/zerocopy/tests/ui/transmute_ref.rs +86 -0
  1538. data/rust-vendor/zerocopy/tests/ui/transmute_ref.stable.stderr +359 -0
  1539. data/rust-vendor/zerocopy/tests/ui/try_transmute.msrv.stderr +54 -0
  1540. data/rust-vendor/zerocopy/tests/ui/try_transmute.nightly.stderr +124 -0
  1541. data/rust-vendor/zerocopy/tests/ui/try_transmute.rs +23 -0
  1542. data/rust-vendor/zerocopy/tests/ui/try_transmute.stable.stderr +124 -0
  1543. data/rust-vendor/zerocopy/tests/ui/try_transmute_mut.msrv.stderr +76 -0
  1544. data/rust-vendor/zerocopy/tests/ui/try_transmute_mut.nightly.stderr +252 -0
  1545. data/rust-vendor/zerocopy/tests/ui/try_transmute_mut.rs +49 -0
  1546. data/rust-vendor/zerocopy/tests/ui/try_transmute_mut.stable.stderr +252 -0
  1547. data/rust-vendor/zerocopy/tests/ui/try_transmute_ref.msrv.stderr +84 -0
  1548. data/rust-vendor/zerocopy/tests/ui/try_transmute_ref.nightly.stderr +206 -0
  1549. data/rust-vendor/zerocopy/tests/ui/try_transmute_ref.rs +36 -0
  1550. data/rust-vendor/zerocopy/tests/ui/try_transmute_ref.stable.stderr +206 -0
  1551. data/rust-vendor/zerocopy/tests/ui.rs +34 -0
  1552. data/rust-vendor/zerocopy-derive/.cargo-checksum.json +1 -1
  1553. data/rust-vendor/zerocopy-derive/.cargo_vcs_info.json +1 -1
  1554. data/rust-vendor/zerocopy-derive/Cargo.lock +1 -180
  1555. data/rust-vendor/zerocopy-derive/Cargo.toml +3 -13
  1556. data/rust-vendor/zerocopy-derive/Cargo.toml.orig +1 -8
  1557. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(C).expected.rs +40 -0
  1558. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i128).expected.rs +40 -0
  1559. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i16).expected.rs +40 -0
  1560. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i32).expected.rs +40 -0
  1561. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i64).expected.rs +40 -0
  1562. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i8).expected.rs +40 -0
  1563. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(isize).expected.rs +40 -0
  1564. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u128).expected.rs +40 -0
  1565. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u16).expected.rs +40 -0
  1566. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u32).expected.rs +40 -0
  1567. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u64).expected.rs +40 -0
  1568. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u8).expected.rs +40 -0
  1569. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(usize).expected.rs +40 -0
  1570. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_struct_basic.expected.rs +10 -1
  1571. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_struct_trailing.expected.rs +10 -1
  1572. data/rust-vendor/zerocopy-derive/src/output_tests/mod.rs +4 -4
  1573. data/rust-vendor/zerocopy-derive/src/util.rs +24 -5
  1574. data/rust-vendor/zerocopy-derive/tests/enum_to_bytes.rs +9 -0
  1575. data/rust-vendor/zerocopy-derive/tests/struct_to_bytes.rs +9 -0
  1576. data/rust-vendor/zerocopy-derive/tests/ui/absence_of_deprecated_warning.msrv.stderr +14 -0
  1577. data/rust-vendor/zerocopy-derive/tests/ui/absence_of_deprecated_warning.nightly.stderr +28 -0
  1578. data/rust-vendor/zerocopy-derive/tests/ui/absence_of_deprecated_warning.rs +35 -0
  1579. data/rust-vendor/zerocopy-derive/tests/ui/absence_of_deprecated_warning.stable.stderr +28 -0
  1580. data/rust-vendor/zerocopy-derive/tests/ui/cfgs/union_into_bytes_cfg.msrv.stderr +15 -0
  1581. data/rust-vendor/zerocopy-derive/tests/ui/derive_transparent.msrv.stderr +93 -0
  1582. data/rust-vendor/zerocopy-derive/tests/ui/derive_transparent.nightly.stderr +198 -0
  1583. data/rust-vendor/zerocopy-derive/tests/ui/derive_transparent.rs +48 -0
  1584. data/rust-vendor/zerocopy-derive/tests/ui/derive_transparent.stable.stderr +173 -0
  1585. data/rust-vendor/zerocopy-derive/tests/ui/enum.msrv.stderr +419 -0
  1586. data/rust-vendor/zerocopy-derive/tests/ui/enum.nightly.stderr +601 -0
  1587. data/rust-vendor/zerocopy-derive/tests/ui/enum.rs +688 -0
  1588. data/rust-vendor/zerocopy-derive/tests/ui/enum.stable.stderr +549 -0
  1589. data/rust-vendor/zerocopy-derive/tests/ui/enum_from_bytes_u8_too_few.msrv.stderr +14 -0
  1590. data/rust-vendor/zerocopy-derive/tests/ui/enum_from_bytes_u8_too_few.nightly.stderr +14 -0
  1591. data/rust-vendor/zerocopy-derive/tests/ui/enum_from_bytes_u8_too_few.rs +274 -0
  1592. data/rust-vendor/zerocopy-derive/tests/ui/enum_from_bytes_u8_too_few.stable.stderr +14 -0
  1593. data/rust-vendor/zerocopy-derive/tests/ui/late_compile_pass.msrv.stderr +101 -0
  1594. data/rust-vendor/zerocopy-derive/tests/ui/late_compile_pass.nightly.stderr +335 -0
  1595. data/rust-vendor/zerocopy-derive/tests/ui/late_compile_pass.rs +108 -0
  1596. data/rust-vendor/zerocopy-derive/tests/ui/late_compile_pass.stable.stderr +295 -0
  1597. data/rust-vendor/zerocopy-derive/tests/ui/mid_compile_pass.msrv.stderr +101 -0
  1598. data/rust-vendor/zerocopy-derive/tests/ui/mid_compile_pass.nightly.stderr +114 -0
  1599. data/rust-vendor/zerocopy-derive/tests/ui/mid_compile_pass.rs +70 -0
  1600. data/rust-vendor/zerocopy-derive/tests/ui/mid_compile_pass.stable.stderr +114 -0
  1601. data/rust-vendor/zerocopy-derive/tests/ui/msrv_specific.msrv.stderr +29 -0
  1602. data/rust-vendor/zerocopy-derive/tests/ui/msrv_specific.nightly.stderr +45 -0
  1603. data/rust-vendor/zerocopy-derive/tests/ui/msrv_specific.rs +40 -0
  1604. data/rust-vendor/zerocopy-derive/tests/ui/msrv_specific.stable.stderr +45 -0
  1605. data/rust-vendor/zerocopy-derive/tests/ui/privacy.msrv.stderr +147 -0
  1606. data/rust-vendor/zerocopy-derive/tests/ui/privacy.nightly.stderr +32 -0
  1607. data/rust-vendor/zerocopy-derive/tests/ui/privacy.rs +160 -0
  1608. data/rust-vendor/zerocopy-derive/tests/ui/privacy.stable.stderr +32 -0
  1609. data/rust-vendor/zerocopy-derive/tests/ui/struct.msrv.stderr +87 -0
  1610. data/rust-vendor/zerocopy-derive/tests/ui/struct.nightly.stderr +554 -0
  1611. data/rust-vendor/zerocopy-derive/tests/ui/struct.rs +339 -0
  1612. data/rust-vendor/zerocopy-derive/tests/ui/struct.stable.stderr +522 -0
  1613. data/rust-vendor/zerocopy-derive/tests/ui/union.msrv.stderr +88 -0
  1614. data/rust-vendor/zerocopy-derive/tests/ui/union.nightly.stderr +130 -0
  1615. data/rust-vendor/zerocopy-derive/tests/ui/union.rs +134 -0
  1616. data/rust-vendor/zerocopy-derive/tests/ui/union.stable.stderr +125 -0
  1617. data/rust-vendor/zerocopy-derive/tests/ui.rs +28 -0
  1618. data/rust-vendor/zerocopy-derive/tests/union_to_bytes.rs +9 -0
  1619. metadata +1263 -458
  1620. data/ext/html-to-markdown-rb/native/Cargo.lock +0 -1591
  1621. data/rust-vendor/futf/.cargo-checksum.json +0 -1
  1622. data/rust-vendor/futf/.cargo_vcs_info.json +0 -6
  1623. data/rust-vendor/futf/.travis.yml +0 -11
  1624. data/rust-vendor/futf/Cargo.toml +0 -24
  1625. data/rust-vendor/futf/Cargo.toml.orig +0 -12
  1626. data/rust-vendor/futf/LICENSE-APACHE +0 -201
  1627. data/rust-vendor/futf/LICENSE-MIT +0 -25
  1628. data/rust-vendor/futf/README.md +0 -18
  1629. data/rust-vendor/futf/src/lib.rs +0 -248
  1630. data/rust-vendor/futf/src/test.rs +0 -270
  1631. data/rust-vendor/html5ever/examples/capi/tokenize.c +0 -74
  1632. data/rust-vendor/mac/.cargo-checksum.json +0 -1
  1633. data/rust-vendor/mac/.travis.yml +0 -19
  1634. data/rust-vendor/mac/Cargo.toml +0 -10
  1635. data/rust-vendor/mac/README.md +0 -27
  1636. data/rust-vendor/mac/src/cfg.rs +0 -90
  1637. data/rust-vendor/mac/src/format.rs +0 -50
  1638. data/rust-vendor/mac/src/inspect.rs +0 -93
  1639. data/rust-vendor/mac/src/lib.rs +0 -71
  1640. data/rust-vendor/mac/src/matches.rs +0 -44
  1641. data/rust-vendor/mac/src/mem.rs +0 -44
  1642. data/rust-vendor/mac/src/syntax_ext.rs +0 -31
  1643. data/rust-vendor/mac/src/test.rs +0 -24
  1644. data/rust-vendor/markup5ever/Cargo.lock +0 -292
  1645. data/rust-vendor/tendril/.github/workflows/main.yml +0 -51
  1646. data/rust-vendor/tendril/src/bench.rs +0 -159
  1647. data/rust-vendor/wasip2/wit/deps/cli/command.wit +0 -10
  1648. data/rust-vendor/wasip2/wit/deps/cli/environment.wit +0 -22
  1649. data/rust-vendor/wasip2/wit/deps/cli/exit.wit +0 -17
  1650. data/rust-vendor/wasip2/wit/deps/cli/imports.wit +0 -36
  1651. data/rust-vendor/wasip2/wit/deps/cli/run.wit +0 -6
  1652. data/rust-vendor/wasip2/wit/deps/cli/stdio.wit +0 -26
  1653. data/rust-vendor/wasip2/wit/deps/cli/terminal.wit +0 -62
  1654. data/rust-vendor/wasip2/wit/deps/clocks/monotonic-clock.wit +0 -50
  1655. data/rust-vendor/wasip2/wit/deps/clocks/timezone.wit +0 -55
  1656. data/rust-vendor/wasip2/wit/deps/clocks/wall-clock.wit +0 -46
  1657. data/rust-vendor/wasip2/wit/deps/clocks/world.wit +0 -11
  1658. data/rust-vendor/wasip2/wit/deps/filesystem/preopens.wit +0 -11
  1659. data/rust-vendor/wasip2/wit/deps/filesystem/types.wit +0 -676
  1660. data/rust-vendor/wasip2/wit/deps/filesystem/world.wit +0 -9
  1661. data/rust-vendor/wasip2/wit/deps/http/handler.wit +0 -49
  1662. data/rust-vendor/wasip2/wit/deps/http/proxy.wit +0 -50
  1663. data/rust-vendor/wasip2/wit/deps/http/types.wit +0 -688
  1664. data/rust-vendor/wasip2/wit/deps/io/error.wit +0 -34
  1665. data/rust-vendor/wasip2/wit/deps/io/poll.wit +0 -47
  1666. data/rust-vendor/wasip2/wit/deps/io/streams.wit +0 -290
  1667. data/rust-vendor/wasip2/wit/deps/io/world.wit +0 -10
  1668. data/rust-vendor/wasip2/wit/deps/random/insecure-seed.wit +0 -27
  1669. data/rust-vendor/wasip2/wit/deps/random/insecure.wit +0 -25
  1670. data/rust-vendor/wasip2/wit/deps/random/random.wit +0 -29
  1671. data/rust-vendor/wasip2/wit/deps/random/world.wit +0 -13
  1672. data/rust-vendor/wasip2/wit/deps/sockets/instance-network.wit +0 -11
  1673. data/rust-vendor/wasip2/wit/deps/sockets/ip-name-lookup.wit +0 -56
  1674. data/rust-vendor/wasip2/wit/deps/sockets/network.wit +0 -169
  1675. data/rust-vendor/wasip2/wit/deps/sockets/tcp-create-socket.wit +0 -30
  1676. data/rust-vendor/wasip2/wit/deps/sockets/tcp.wit +0 -387
  1677. data/rust-vendor/wasip2/wit/deps/sockets/udp-create-socket.wit +0 -30
  1678. data/rust-vendor/wasip2/wit/deps/sockets/udp.wit +0 -288
  1679. data/rust-vendor/wasip2/wit/deps/sockets/world.wit +0 -19
  1680. data/rust-vendor/wit-bindgen-0.46.0/.cargo-checksum.json +0 -1
  1681. data/rust-vendor/wit-bindgen-0.46.0/.cargo_vcs_info.json +0 -6
  1682. data/rust-vendor/wit-bindgen-0.46.0/Cargo.lock +0 -428
  1683. data/rust-vendor/wit-bindgen-0.46.0/Cargo.toml +0 -88
  1684. data/rust-vendor/wit-bindgen-0.46.0/Cargo.toml.orig +0 -37
  1685. data/rust-vendor/wit-bindgen-0.46.0/LICENSE-APACHE +0 -201
  1686. data/rust-vendor/wit-bindgen-0.46.0/LICENSE-Apache-2.0_WITH_LLVM-exception +0 -220
  1687. data/rust-vendor/wit-bindgen-0.46.0/README.md +0 -45
  1688. data/rust-vendor/wit-bindgen-0.46.0/build.rs +0 -32
  1689. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_0_world_imports.rs +0 -17
  1690. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_1_interface_imports.rs +0 -32
  1691. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_2_imported_resources.rs +0 -22
  1692. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_3_world_exports.rs +0 -47
  1693. data/rust-vendor/wit-bindgen-0.46.0/src/examples/_4_exported_resources.rs +0 -26
  1694. data/rust-vendor/wit-bindgen-0.46.0/src/examples.rs +0 -55
  1695. data/rust-vendor/wit-bindgen-0.46.0/src/lib.rs +0 -881
  1696. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/abi_buffer.rs +0 -417
  1697. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/cabi.rs +0 -112
  1698. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/error_context.rs +0 -94
  1699. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/future_support.rs +0 -734
  1700. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/stream_support.rs +0 -604
  1701. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/subtask.rs +0 -289
  1702. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/waitable.rs +0 -466
  1703. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/waitable_set.rs +0 -100
  1704. data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support.rs +0 -634
  1705. data/rust-vendor/wit-bindgen-0.46.0/src/rt/mod.rs +0 -230
  1706. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi.c +0 -20
  1707. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi.o +0 -0
  1708. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.c +0 -10
  1709. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.o +0 -0
  1710. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.rs +0 -11
  1711. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_wasip3.c +0 -12
  1712. data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_wasip3.o +0 -0
  1713. data/rust-vendor/wit-bindgen-0.46.0/wasi-cli@0.2.0.wasm +0 -0
  1714. data/rust-vendor/zerocopy/tests/trybuild.rs +0 -40
  1715. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-bytes.rs +0 -19
  1716. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-bytes.stderr +0 -11
  1717. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-zeros.rs +0 -19
  1718. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-zeros.stderr +0 -11
  1719. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-immutable.rs +0 -19
  1720. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-immutable.stderr +0 -11
  1721. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-into-bytes.rs +0 -19
  1722. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-into-bytes.stderr +0 -11
  1723. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-issue-1296.rs +0 -57
  1724. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-issue-1296.stderr +0 -11
  1725. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-known-layout.rs +0 -19
  1726. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-known-layout.stderr +0 -11
  1727. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-try-from-bytes.rs +0 -19
  1728. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-try-from-bytes.stderr +0 -11
  1729. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-unaligned.rs +0 -19
  1730. data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-unaligned.stderr +0 -11
  1731. data/rust-vendor/zerocopy/tests/ui-msrv/include_value_not_from_bytes.rs +0 -17
  1732. data/rust-vendor/zerocopy/tests/ui-msrv/include_value_not_from_bytes.stderr +0 -15
  1733. data/rust-vendor/zerocopy/tests/ui-msrv/include_value_wrong_size.rs +0 -12
  1734. data/rust-vendor/zerocopy/tests/ui-msrv/include_value_wrong_size.stderr +0 -9
  1735. data/rust-vendor/zerocopy/tests/ui-msrv/max-align.rs +0 -99
  1736. data/rust-vendor/zerocopy/tests/ui-msrv/max-align.stderr +0 -5
  1737. data/rust-vendor/zerocopy/tests/ui-msrv/ptr-is-invariant-over-v.rs +0 -29
  1738. data/rust-vendor/zerocopy/tests/ui-msrv/ptr-is-invariant-over-v.stderr +0 -17
  1739. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-dst-not-frombytes.rs +0 -17
  1740. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-dst-not-frombytes.stderr +0 -15
  1741. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-const.rs +0 -18
  1742. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-const.stderr +0 -48
  1743. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-a-reference.rs +0 -15
  1744. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-a-reference.stderr +0 -19
  1745. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-frombytes.rs +0 -22
  1746. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-frombytes.stderr +0 -7
  1747. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-intobytes.rs +0 -22
  1748. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-intobytes.stderr +0 -7
  1749. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-illegal-lifetime.rs +0 -15
  1750. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-illegal-lifetime.stderr +0 -9
  1751. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-dst-not-references.rs +0 -15
  1752. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-dst-not-references.stderr +0 -12
  1753. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-immutable.rs +0 -16
  1754. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-immutable.stderr +0 -11
  1755. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-a-reference.rs +0 -15
  1756. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-a-reference.stderr +0 -12
  1757. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-frombytes.rs +0 -22
  1758. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-frombytes.stderr +0 -7
  1759. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-intobytes.rs +0 -22
  1760. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-intobytes.stderr +0 -7
  1761. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-unsized.rs +0 -15
  1762. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-unsized.stderr +0 -16
  1763. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ptr-to-usize.rs +0 -18
  1764. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ptr-to-usize.stderr +0 -15
  1765. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-mutable.rs +0 -17
  1766. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-mutable.stderr +0 -39
  1767. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-a-reference.rs +0 -15
  1768. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-a-reference.stderr +0 -39
  1769. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-frombytes.rs +0 -21
  1770. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-frombytes.stderr +0 -12
  1771. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-nocell.rs +0 -21
  1772. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-nocell.stderr +0 -12
  1773. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-illegal-lifetime.rs +0 -15
  1774. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-illegal-lifetime.stderr +0 -9
  1775. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-dst-not-references.rs +0 -15
  1776. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-dst-not-references.stderr +0 -52
  1777. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-a-reference.rs +0 -15
  1778. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-a-reference.stderr +0 -12
  1779. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-intobytes.rs +0 -21
  1780. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-intobytes.stderr +0 -25
  1781. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-nocell.rs +0 -21
  1782. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-nocell.stderr +0 -25
  1783. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-unsized.rs +0 -14
  1784. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-unsized.stderr +0 -16
  1785. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-decrease.rs +0 -18
  1786. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-decrease.stderr +0 -9
  1787. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase-allow-shrink.rs +0 -18
  1788. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase-allow-shrink.stderr +0 -9
  1789. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase.rs +0 -18
  1790. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase.stderr +0 -9
  1791. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-src-not-intobytes.rs +0 -17
  1792. data/rust-vendor/zerocopy/tests/ui-msrv/transmute-src-not-intobytes.stderr +0 -15
  1793. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-dst-not-tryfrombytes.rs +0 -16
  1794. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-dst-not-tryfrombytes.stderr +0 -37
  1795. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-decrease.rs +0 -18
  1796. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-decrease.stderr +0 -9
  1797. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-increase.rs +0 -18
  1798. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-increase.stderr +0 -9
  1799. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-src-not-intobytes.rs +0 -17
  1800. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-src-not-intobytes.stderr +0 -12
  1801. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-dst-not-tryfrombytes.rs +0 -19
  1802. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-dst-not-tryfrombytes.stderr +0 -40
  1803. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-frombytes.rs +0 -22
  1804. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-frombytes.stderr +0 -23
  1805. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-intobytes.rs +0 -22
  1806. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-intobytes.stderr +0 -23
  1807. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-mutable.rs +0 -17
  1808. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-mutable.stderr +0 -22
  1809. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-not-immutable-tryfrombytes.rs +0 -18
  1810. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +0 -40
  1811. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-src-not-immutable-intobytes.rs +0 -18
  1812. data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-src-not-immutable-intobytes.stderr +0 -15
  1813. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-bytes.rs +0 -19
  1814. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-bytes.stderr +0 -27
  1815. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-zeros.rs +0 -19
  1816. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-zeros.stderr +0 -27
  1817. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-immutable.rs +0 -19
  1818. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-immutable.stderr +0 -27
  1819. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-into-bytes.rs +0 -19
  1820. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-into-bytes.stderr +0 -27
  1821. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs +0 -57
  1822. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-issue-1296.stderr +0 -49
  1823. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-known-layout.rs +0 -19
  1824. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-known-layout.stderr +0 -27
  1825. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-try-from-bytes.rs +0 -19
  1826. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-try-from-bytes.stderr +0 -27
  1827. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-unaligned.rs +0 -19
  1828. data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-unaligned.stderr +0 -27
  1829. data/rust-vendor/zerocopy/tests/ui-nightly/include_value_not_from_bytes.rs +0 -17
  1830. data/rust-vendor/zerocopy/tests/ui-nightly/include_value_not_from_bytes.stderr +0 -31
  1831. data/rust-vendor/zerocopy/tests/ui-nightly/include_value_wrong_size.rs +0 -12
  1832. data/rust-vendor/zerocopy/tests/ui-nightly/include_value_wrong_size.stderr +0 -17
  1833. data/rust-vendor/zerocopy/tests/ui-nightly/max-align.rs +0 -99
  1834. data/rust-vendor/zerocopy/tests/ui-nightly/max-align.stderr +0 -5
  1835. data/rust-vendor/zerocopy/tests/ui-nightly/ptr-is-invariant-over-v.rs +0 -29
  1836. data/rust-vendor/zerocopy/tests/ui-nightly/ptr-is-invariant-over-v.stderr +0 -31
  1837. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-dst-not-frombytes.rs +0 -17
  1838. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-dst-not-frombytes.stderr +0 -31
  1839. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-const.rs +0 -18
  1840. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-const.stderr +0 -32
  1841. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-a-reference.rs +0 -15
  1842. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-a-reference.stderr +0 -19
  1843. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-frombytes.rs +0 -22
  1844. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-frombytes.stderr +0 -31
  1845. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-intobytes.rs +0 -22
  1846. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-intobytes.stderr +0 -31
  1847. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-illegal-lifetime.rs +0 -15
  1848. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-illegal-lifetime.stderr +0 -12
  1849. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-dst-not-references.rs +0 -15
  1850. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr +0 -15
  1851. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-immutable.rs +0 -16
  1852. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-immutable.stderr +0 -11
  1853. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-a-reference.rs +0 -15
  1854. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr +0 -15
  1855. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-frombytes.rs +0 -22
  1856. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-frombytes.stderr +0 -31
  1857. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-intobytes.rs +0 -22
  1858. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-intobytes.stderr +0 -31
  1859. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-unsized.rs +0 -15
  1860. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-unsized.stderr +0 -16
  1861. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ptr-to-usize.rs +0 -18
  1862. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ptr-to-usize.stderr +0 -29
  1863. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-mutable.rs +0 -17
  1864. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-mutable.stderr +0 -39
  1865. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-a-reference.rs +0 -15
  1866. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-a-reference.stderr +0 -39
  1867. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-frombytes.rs +0 -21
  1868. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-frombytes.stderr +0 -31
  1869. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-nocell.rs +0 -21
  1870. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-nocell.stderr +0 -31
  1871. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-illegal-lifetime.rs +0 -15
  1872. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-illegal-lifetime.stderr +0 -12
  1873. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-dst-not-references.rs +0 -15
  1874. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr +0 -55
  1875. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-a-reference.rs +0 -15
  1876. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr +0 -15
  1877. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-intobytes.rs +0 -21
  1878. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-intobytes.stderr +0 -60
  1879. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-nocell.rs +0 -21
  1880. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-nocell.stderr +0 -60
  1881. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-unsized.rs +0 -14
  1882. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-unsized.stderr +0 -16
  1883. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-decrease.rs +0 -18
  1884. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-decrease.stderr +0 -17
  1885. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase-allow-shrink.rs +0 -18
  1886. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase-allow-shrink.stderr +0 -17
  1887. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase.rs +0 -18
  1888. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase.stderr +0 -17
  1889. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-src-not-intobytes.rs +0 -17
  1890. data/rust-vendor/zerocopy/tests/ui-nightly/transmute-src-not-intobytes.stderr +0 -34
  1891. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.rs +0 -16
  1892. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.stderr +0 -88
  1893. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-decrease.rs +0 -18
  1894. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-decrease.stderr +0 -9
  1895. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-increase.rs +0 -18
  1896. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-increase.stderr +0 -9
  1897. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-src-not-intobytes.rs +0 -17
  1898. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-src-not-intobytes.stderr +0 -31
  1899. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-dst-not-tryfrombytes.rs +0 -19
  1900. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-dst-not-tryfrombytes.stderr +0 -120
  1901. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-frombytes.rs +0 -22
  1902. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-frombytes.stderr +0 -95
  1903. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-intobytes.rs +0 -22
  1904. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-intobytes.stderr +0 -95
  1905. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-mutable.rs +0 -17
  1906. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-mutable.stderr +0 -32
  1907. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.rs +0 -18
  1908. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +0 -120
  1909. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-src-not-immutable-intobytes.rs +0 -18
  1910. data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-src-not-immutable-intobytes.stderr +0 -63
  1911. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-bytes.rs +0 -19
  1912. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-bytes.stderr +0 -27
  1913. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-zeros.rs +0 -19
  1914. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-zeros.stderr +0 -27
  1915. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-immutable.rs +0 -19
  1916. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-immutable.stderr +0 -27
  1917. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-into-bytes.rs +0 -19
  1918. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-into-bytes.stderr +0 -27
  1919. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-issue-1296.rs +0 -57
  1920. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-issue-1296.stderr +0 -49
  1921. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-known-layout.rs +0 -19
  1922. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-known-layout.stderr +0 -27
  1923. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-try-from-bytes.rs +0 -19
  1924. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-try-from-bytes.stderr +0 -27
  1925. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-unaligned.rs +0 -19
  1926. data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-unaligned.stderr +0 -27
  1927. data/rust-vendor/zerocopy/tests/ui-stable/include_value_not_from_bytes.rs +0 -17
  1928. data/rust-vendor/zerocopy/tests/ui-stable/include_value_not_from_bytes.stderr +0 -31
  1929. data/rust-vendor/zerocopy/tests/ui-stable/include_value_wrong_size.rs +0 -12
  1930. data/rust-vendor/zerocopy/tests/ui-stable/include_value_wrong_size.stderr +0 -17
  1931. data/rust-vendor/zerocopy/tests/ui-stable/max-align.rs +0 -99
  1932. data/rust-vendor/zerocopy/tests/ui-stable/max-align.stderr +0 -5
  1933. data/rust-vendor/zerocopy/tests/ui-stable/ptr-is-invariant-over-v.rs +0 -29
  1934. data/rust-vendor/zerocopy/tests/ui-stable/ptr-is-invariant-over-v.stderr +0 -31
  1935. data/rust-vendor/zerocopy/tests/ui-stable/transmute-dst-not-frombytes.rs +0 -17
  1936. data/rust-vendor/zerocopy/tests/ui-stable/transmute-dst-not-frombytes.stderr +0 -31
  1937. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-const.rs +0 -18
  1938. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-const.stderr +0 -32
  1939. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-a-reference.rs +0 -15
  1940. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-a-reference.stderr +0 -19
  1941. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-frombytes.rs +0 -22
  1942. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-frombytes.stderr +0 -31
  1943. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-intobytes.rs +0 -22
  1944. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-intobytes.stderr +0 -31
  1945. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-illegal-lifetime.rs +0 -15
  1946. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-illegal-lifetime.stderr +0 -12
  1947. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-dst-not-references.rs +0 -15
  1948. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-dst-not-references.stderr +0 -15
  1949. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-immutable.rs +0 -16
  1950. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-immutable.stderr +0 -11
  1951. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-a-reference.rs +0 -15
  1952. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-a-reference.stderr +0 -15
  1953. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-frombytes.rs +0 -22
  1954. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-frombytes.stderr +0 -31
  1955. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-intobytes.rs +0 -22
  1956. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-intobytes.stderr +0 -31
  1957. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-unsized.rs +0 -15
  1958. data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-unsized.stderr +0 -16
  1959. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ptr-to-usize.rs +0 -18
  1960. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ptr-to-usize.stderr +0 -24
  1961. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-mutable.rs +0 -17
  1962. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-mutable.stderr +0 -39
  1963. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-a-reference.rs +0 -15
  1964. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-a-reference.stderr +0 -39
  1965. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-frombytes.rs +0 -21
  1966. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-frombytes.stderr +0 -31
  1967. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-nocell.rs +0 -21
  1968. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-nocell.stderr +0 -31
  1969. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-illegal-lifetime.rs +0 -15
  1970. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-illegal-lifetime.stderr +0 -12
  1971. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-dst-not-references.rs +0 -15
  1972. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-dst-not-references.stderr +0 -55
  1973. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-a-reference.rs +0 -15
  1974. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-a-reference.stderr +0 -15
  1975. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-intobytes.rs +0 -21
  1976. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-intobytes.stderr +0 -60
  1977. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-nocell.rs +0 -21
  1978. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-nocell.stderr +0 -60
  1979. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-unsized.rs +0 -14
  1980. data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-unsized.stderr +0 -16
  1981. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-decrease.rs +0 -18
  1982. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-decrease.stderr +0 -17
  1983. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase-allow-shrink.rs +0 -18
  1984. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase-allow-shrink.stderr +0 -17
  1985. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase.rs +0 -18
  1986. data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase.stderr +0 -17
  1987. data/rust-vendor/zerocopy/tests/ui-stable/transmute-src-not-intobytes.rs +0 -17
  1988. data/rust-vendor/zerocopy/tests/ui-stable/transmute-src-not-intobytes.stderr +0 -34
  1989. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-dst-not-tryfrombytes.rs +0 -16
  1990. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-dst-not-tryfrombytes.stderr +0 -88
  1991. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-decrease.rs +0 -18
  1992. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-decrease.stderr +0 -9
  1993. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-increase.rs +0 -18
  1994. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-increase.stderr +0 -9
  1995. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-src-not-intobytes.rs +0 -17
  1996. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-src-not-intobytes.stderr +0 -31
  1997. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-dst-not-tryfrombytes.rs +0 -19
  1998. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-dst-not-tryfrombytes.stderr +0 -120
  1999. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-frombytes.rs +0 -22
  2000. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-frombytes.stderr +0 -95
  2001. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-intobytes.rs +0 -22
  2002. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-intobytes.stderr +0 -95
  2003. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-mutable.rs +0 -17
  2004. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-mutable.stderr +0 -32
  2005. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-not-immutable-tryfrombytes.rs +0 -18
  2006. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +0 -120
  2007. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.rs +0 -18
  2008. data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.stderr +0 -63
  2009. data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.expected.rs +0 -17
  2010. data/rust-vendor/zerocopy-derive/tests/trybuild.rs +0 -62
  2011. data/rust-vendor/zerocopy-derive/tests/ui-msrv/cfgs/union_into_bytes_cfg.stderr +0 -8
  2012. data/rust-vendor/zerocopy-derive/tests/ui-msrv/derive_transparent.rs +0 -39
  2013. data/rust-vendor/zerocopy-derive/tests/ui-msrv/derive_transparent.stderr +0 -89
  2014. data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum.rs +0 -624
  2015. data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum.stderr +0 -399
  2016. data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum_from_bytes_u8_too_few.rs +0 -273
  2017. data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum_from_bytes_u8_too_few.stderr +0 -11
  2018. data/rust-vendor/zerocopy-derive/tests/ui-msrv/late_compile_pass.rs +0 -92
  2019. data/rust-vendor/zerocopy-derive/tests/ui-msrv/late_compile_pass.stderr +0 -97
  2020. data/rust-vendor/zerocopy-derive/tests/ui-msrv/mid_compile_pass.rs +0 -65
  2021. data/rust-vendor/zerocopy-derive/tests/ui-msrv/mid_compile_pass.stderr +0 -97
  2022. data/rust-vendor/zerocopy-derive/tests/ui-msrv/msrv_specific.rs +0 -39
  2023. data/rust-vendor/zerocopy-derive/tests/ui-msrv/msrv_specific.stderr +0 -25
  2024. data/rust-vendor/zerocopy-derive/tests/ui-msrv/privacy.rs +0 -139
  2025. data/rust-vendor/zerocopy-derive/tests/ui-msrv/privacy.stderr +0 -143
  2026. data/rust-vendor/zerocopy-derive/tests/ui-msrv/struct.rs +0 -286
  2027. data/rust-vendor/zerocopy-derive/tests/ui-msrv/struct.stderr +0 -281
  2028. data/rust-vendor/zerocopy-derive/tests/ui-msrv/union.rs +0 -120
  2029. data/rust-vendor/zerocopy-derive/tests/ui-msrv/union.stderr +0 -84
  2030. data/rust-vendor/zerocopy-derive/tests/ui-nightly/absence_of_deprecated_warning.rs +0 -34
  2031. data/rust-vendor/zerocopy-derive/tests/ui-nightly/absence_of_deprecated_warning.stderr +0 -11
  2032. data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/on_error.rs +0 -19
  2033. data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/union_into_bytes_cfg.rs +0 -27
  2034. data/rust-vendor/zerocopy-derive/tests/ui-nightly/derive_transparent.rs +0 -39
  2035. data/rust-vendor/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr +0 -194
  2036. data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum.rs +0 -624
  2037. data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum.stderr +0 -578
  2038. data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum_from_bytes_u8_too_few.rs +0 -273
  2039. data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum_from_bytes_u8_too_few.stderr +0 -11
  2040. data/rust-vendor/zerocopy-derive/tests/ui-nightly/late_compile_pass.rs +0 -92
  2041. data/rust-vendor/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr +0 -331
  2042. data/rust-vendor/zerocopy-derive/tests/ui-nightly/mid_compile_pass.rs +0 -65
  2043. data/rust-vendor/zerocopy-derive/tests/ui-nightly/mid_compile_pass.stderr +0 -109
  2044. data/rust-vendor/zerocopy-derive/tests/ui-nightly/privacy.rs +0 -139
  2045. data/rust-vendor/zerocopy-derive/tests/ui-nightly/privacy.stderr +0 -17
  2046. data/rust-vendor/zerocopy-derive/tests/ui-nightly/struct.rs +0 -286
  2047. data/rust-vendor/zerocopy-derive/tests/ui-nightly/struct.stderr +0 -555
  2048. data/rust-vendor/zerocopy-derive/tests/ui-nightly/union.rs +0 -120
  2049. data/rust-vendor/zerocopy-derive/tests/ui-nightly/union.stderr +0 -128
  2050. data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/on_error.rs +0 -19
  2051. data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/union_into_bytes_cfg.rs +0 -27
  2052. data/rust-vendor/zerocopy-derive/tests/ui-stable/derive_transparent.rs +0 -39
  2053. data/rust-vendor/zerocopy-derive/tests/ui-stable/derive_transparent.stderr +0 -169
  2054. data/rust-vendor/zerocopy-derive/tests/ui-stable/enum.rs +0 -624
  2055. data/rust-vendor/zerocopy-derive/tests/ui-stable/enum.stderr +0 -523
  2056. data/rust-vendor/zerocopy-derive/tests/ui-stable/enum_from_bytes_u8_too_few.rs +0 -273
  2057. data/rust-vendor/zerocopy-derive/tests/ui-stable/enum_from_bytes_u8_too_few.stderr +0 -11
  2058. data/rust-vendor/zerocopy-derive/tests/ui-stable/late_compile_pass.rs +0 -92
  2059. data/rust-vendor/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr +0 -291
  2060. data/rust-vendor/zerocopy-derive/tests/ui-stable/mid_compile_pass.rs +0 -65
  2061. data/rust-vendor/zerocopy-derive/tests/ui-stable/mid_compile_pass.stderr +0 -109
  2062. data/rust-vendor/zerocopy-derive/tests/ui-stable/privacy.rs +0 -139
  2063. data/rust-vendor/zerocopy-derive/tests/ui-stable/privacy.stderr +0 -17
  2064. data/rust-vendor/zerocopy-derive/tests/ui-stable/struct.rs +0 -286
  2065. data/rust-vendor/zerocopy-derive/tests/ui-stable/struct.stderr +0 -499
  2066. data/rust-vendor/zerocopy-derive/tests/ui-stable/union.rs +0 -120
  2067. data/rust-vendor/zerocopy-derive/tests/ui-stable/union.stderr +0 -120
  2068. /data/rust-vendor/{wit-bindgen-0.46.0 → async-trait}/LICENSE-MIT +0 -0
  2069. /data/rust-vendor/zerocopy-derive/tests/{ui-msrv/cfgs/on_error.stderr → ui/cfgs/on_error.msrv.stderr} +0 -0
  2070. /data/rust-vendor/zerocopy-derive/tests/{ui-nightly/cfgs/on_error.stderr → ui/cfgs/on_error.nightly.stderr} +0 -0
  2071. /data/rust-vendor/zerocopy-derive/tests/{ui-msrv → ui}/cfgs/on_error.rs +0 -0
  2072. /data/rust-vendor/zerocopy-derive/tests/{ui-stable/cfgs/on_error.stderr → ui/cfgs/on_error.stable.stderr} +0 -0
  2073. /data/rust-vendor/zerocopy-derive/tests/{ui-nightly/cfgs/union_into_bytes_cfg.stderr → ui/cfgs/union_into_bytes_cfg.nightly.stderr} +0 -0
  2074. /data/rust-vendor/zerocopy-derive/tests/{ui-msrv → ui}/cfgs/union_into_bytes_cfg.rs +0 -0
  2075. /data/rust-vendor/zerocopy-derive/tests/{ui-stable/cfgs/union_into_bytes_cfg.stderr → ui/cfgs/union_into_bytes_cfg.stable.stderr} +0 -0
@@ -0,0 +1,2333 @@
1
+ use crate::io::{Interest, PollEvented, ReadBuf, Ready};
2
+ use crate::net::{to_socket_addrs, ToSocketAddrs};
3
+ use crate::util::check_socket_for_blocking;
4
+
5
+ use std::fmt;
6
+ use std::io;
7
+ use std::net::{self, Ipv4Addr, Ipv6Addr, SocketAddr};
8
+ use std::task::{ready, Context, Poll};
9
+
10
+ cfg_io_util! {
11
+ use bytes::BufMut;
12
+ }
13
+
14
+ cfg_net! {
15
+ /// A UDP socket.
16
+ ///
17
+ /// UDP is "connectionless", unlike TCP. Meaning, regardless of what address you've bound to, a `UdpSocket`
18
+ /// is free to communicate with many different remotes. In tokio there are basically two main ways to use `UdpSocket`:
19
+ ///
20
+ /// * one to many: [`bind`](`UdpSocket::bind`) and use [`send_to`](`UdpSocket::send_to`)
21
+ /// and [`recv_from`](`UdpSocket::recv_from`) to communicate with many different addresses
22
+ /// * one to one: [`connect`](`UdpSocket::connect`) and associate with a single address, using [`send`](`UdpSocket::send`)
23
+ /// and [`recv`](`UdpSocket::recv`) to communicate only with that remote address
24
+ ///
25
+ /// This type does not provide a `split` method, because this functionality
26
+ /// can be achieved by instead wrapping the socket in an [`Arc`]. Note that
27
+ /// you do not need a `Mutex` to share the `UdpSocket` — an `Arc<UdpSocket>`
28
+ /// is enough. This is because all of the methods take `&self` instead of
29
+ /// `&mut self`. Once you have wrapped it in an `Arc`, you can call
30
+ /// `.clone()` on the `Arc<UdpSocket>` to get multiple shared handles to the
31
+ /// same socket. An example of such usage can be found further down.
32
+ ///
33
+ /// [`Arc`]: std::sync::Arc
34
+ ///
35
+ /// # Streams
36
+ ///
37
+ /// If you need to listen over UDP and produce a [`Stream`], you can look
38
+ /// at [`UdpFramed`].
39
+ ///
40
+ /// [`UdpFramed`]: https://docs.rs/tokio-util/latest/tokio_util/udp/struct.UdpFramed.html
41
+ /// [`Stream`]: https://docs.rs/futures/0.3/futures/stream/trait.Stream.html
42
+ ///
43
+ /// # Example: one to many (bind)
44
+ ///
45
+ /// Using `bind` we can create a simple echo server that sends and recv's with many different clients:
46
+ /// ```no_run
47
+ /// use tokio::net::UdpSocket;
48
+ /// use std::io;
49
+ ///
50
+ /// #[tokio::main]
51
+ /// async fn main() -> io::Result<()> {
52
+ /// let sock = UdpSocket::bind("0.0.0.0:8080").await?;
53
+ /// let mut buf = [0; 1024];
54
+ /// loop {
55
+ /// let (len, addr) = sock.recv_from(&mut buf).await?;
56
+ /// println!("{:?} bytes received from {:?}", len, addr);
57
+ ///
58
+ /// let len = sock.send_to(&buf[..len], addr).await?;
59
+ /// println!("{:?} bytes sent", len);
60
+ /// }
61
+ /// }
62
+ /// ```
63
+ ///
64
+ /// # Example: one to one (connect)
65
+ ///
66
+ /// Or using `connect` we can echo with a single remote address using `send` and `recv`:
67
+ /// ```no_run
68
+ /// use tokio::net::UdpSocket;
69
+ /// use std::io;
70
+ ///
71
+ /// #[tokio::main]
72
+ /// async fn main() -> io::Result<()> {
73
+ /// let sock = UdpSocket::bind("0.0.0.0:8080").await?;
74
+ ///
75
+ /// let remote_addr = "127.0.0.1:59611";
76
+ /// sock.connect(remote_addr).await?;
77
+ /// let mut buf = [0; 1024];
78
+ /// loop {
79
+ /// let len = sock.recv(&mut buf).await?;
80
+ /// println!("{:?} bytes received from {:?}", len, remote_addr);
81
+ ///
82
+ /// let len = sock.send(&buf[..len]).await?;
83
+ /// println!("{:?} bytes sent", len);
84
+ /// }
85
+ /// }
86
+ /// ```
87
+ ///
88
+ /// # Example: Splitting with `Arc`
89
+ ///
90
+ /// Because `send_to` and `recv_from` take `&self`. It's perfectly alright
91
+ /// to use an `Arc<UdpSocket>` and share the references to multiple tasks.
92
+ /// Here is a similar "echo" example that supports concurrent
93
+ /// sending/receiving:
94
+ ///
95
+ /// ```no_run
96
+ /// use tokio::{net::UdpSocket, sync::mpsc};
97
+ /// use std::{io, net::SocketAddr, sync::Arc};
98
+ ///
99
+ /// #[tokio::main]
100
+ /// async fn main() -> io::Result<()> {
101
+ /// let sock = UdpSocket::bind("0.0.0.0:8080".parse::<SocketAddr>().unwrap()).await?;
102
+ /// let r = Arc::new(sock);
103
+ /// let s = r.clone();
104
+ /// let (tx, mut rx) = mpsc::channel::<(Vec<u8>, SocketAddr)>(1_000);
105
+ ///
106
+ /// tokio::spawn(async move {
107
+ /// while let Some((bytes, addr)) = rx.recv().await {
108
+ /// let len = s.send_to(&bytes, &addr).await.unwrap();
109
+ /// println!("{:?} bytes sent", len);
110
+ /// }
111
+ /// });
112
+ ///
113
+ /// let mut buf = [0; 1024];
114
+ /// loop {
115
+ /// let (len, addr) = r.recv_from(&mut buf).await?;
116
+ /// println!("{:?} bytes received from {:?}", len, addr);
117
+ /// tx.send((buf[..len].to_vec(), addr)).await.unwrap();
118
+ /// }
119
+ /// }
120
+ /// ```
121
+ ///
122
+ pub struct UdpSocket {
123
+ io: PollEvented<mio::net::UdpSocket>,
124
+ }
125
+ }
126
+
127
+ impl UdpSocket {
128
+ /// This function will create a new UDP socket and attempt to bind it to
129
+ /// the `addr` provided.
130
+ ///
131
+ /// Binding with a port number of 0 will request that the OS assigns a port
132
+ /// to this listener. The port allocated can be queried via the `local_addr`
133
+ /// method.
134
+ ///
135
+ /// # Example
136
+ ///
137
+ /// ```no_run
138
+ /// use tokio::net::UdpSocket;
139
+ /// use std::io;
140
+ ///
141
+ /// #[tokio::main]
142
+ /// async fn main() -> io::Result<()> {
143
+ /// # if cfg!(miri) { return Ok(()); } // No `socket` in miri.
144
+ /// let sock = UdpSocket::bind("0.0.0.0:8080").await?;
145
+ /// // use `sock`
146
+ /// # let _ = sock;
147
+ /// Ok(())
148
+ /// }
149
+ /// ```
150
+ pub async fn bind<A: ToSocketAddrs>(addr: A) -> io::Result<UdpSocket> {
151
+ let addrs = to_socket_addrs(addr).await?;
152
+ let mut last_err = None;
153
+
154
+ for addr in addrs {
155
+ match UdpSocket::bind_addr(addr) {
156
+ Ok(socket) => return Ok(socket),
157
+ Err(e) => last_err = Some(e),
158
+ }
159
+ }
160
+
161
+ Err(last_err.unwrap_or_else(|| {
162
+ io::Error::new(
163
+ io::ErrorKind::InvalidInput,
164
+ "could not resolve to any address",
165
+ )
166
+ }))
167
+ }
168
+
169
+ fn bind_addr(addr: SocketAddr) -> io::Result<UdpSocket> {
170
+ let sys = mio::net::UdpSocket::bind(addr)?;
171
+ UdpSocket::new(sys)
172
+ }
173
+
174
+ #[track_caller]
175
+ fn new(socket: mio::net::UdpSocket) -> io::Result<UdpSocket> {
176
+ let io = PollEvented::new(socket)?;
177
+ Ok(UdpSocket { io })
178
+ }
179
+
180
+ /// Creates new `UdpSocket` from a previously bound `std::net::UdpSocket`.
181
+ ///
182
+ /// This function is intended to be used to wrap a UDP socket from the
183
+ /// standard library in the Tokio equivalent.
184
+ ///
185
+ /// This can be used in conjunction with `socket2`'s `Socket` interface to
186
+ /// configure a socket before it's handed off, such as setting options like
187
+ /// `reuse_address` or binding to multiple addresses.
188
+ ///
189
+ /// # Notes
190
+ ///
191
+ /// The caller is responsible for ensuring that the socket is in
192
+ /// non-blocking mode. Otherwise all I/O operations on the socket
193
+ /// will block the thread, which will cause unexpected behavior.
194
+ /// Non-blocking mode can be set using [`set_nonblocking`].
195
+ ///
196
+ /// Passing a listener in blocking mode is always erroneous,
197
+ /// and the behavior in that case may change in the future.
198
+ /// For example, it could panic.
199
+ ///
200
+ /// [`set_nonblocking`]: std::net::UdpSocket::set_nonblocking
201
+ ///
202
+ /// # Panics
203
+ ///
204
+ /// This function panics if thread-local runtime is not set.
205
+ ///
206
+ /// The runtime is usually set implicitly when this function is called
207
+ /// from a future driven by a tokio runtime, otherwise runtime can be set
208
+ /// explicitly with [`Runtime::enter`](crate::runtime::Runtime::enter) function.
209
+ ///
210
+ /// # Example
211
+ ///
212
+ /// ```no_run
213
+ /// use tokio::net::UdpSocket;
214
+ /// # use std::{io, net::SocketAddr};
215
+ ///
216
+ /// # #[tokio::main]
217
+ /// # async fn main() -> io::Result<()> {
218
+ /// let addr = "0.0.0.0:8080".parse::<SocketAddr>().unwrap();
219
+ /// let std_sock = std::net::UdpSocket::bind(addr)?;
220
+ /// std_sock.set_nonblocking(true)?;
221
+ /// let sock = UdpSocket::from_std(std_sock)?;
222
+ /// // use `sock`
223
+ /// # Ok(())
224
+ /// # }
225
+ /// ```
226
+ #[track_caller]
227
+ pub fn from_std(socket: net::UdpSocket) -> io::Result<UdpSocket> {
228
+ check_socket_for_blocking(&socket)?;
229
+
230
+ let io = mio::net::UdpSocket::from_std(socket);
231
+ UdpSocket::new(io)
232
+ }
233
+
234
+ /// Turns a [`tokio::net::UdpSocket`] into a [`std::net::UdpSocket`].
235
+ ///
236
+ /// The returned [`std::net::UdpSocket`] will have nonblocking mode set as
237
+ /// `true`. Use [`set_nonblocking`] to change the blocking mode if needed.
238
+ ///
239
+ /// # Examples
240
+ ///
241
+ /// ```rust,no_run
242
+ /// use std::error::Error;
243
+ ///
244
+ /// #[tokio::main]
245
+ /// async fn main() -> Result<(), Box<dyn Error>> {
246
+ /// let tokio_socket = tokio::net::UdpSocket::bind("127.0.0.1:0").await?;
247
+ /// let std_socket = tokio_socket.into_std()?;
248
+ /// std_socket.set_nonblocking(false)?;
249
+ /// Ok(())
250
+ /// }
251
+ /// ```
252
+ ///
253
+ /// [`tokio::net::UdpSocket`]: UdpSocket
254
+ /// [`std::net::UdpSocket`]: std::net::UdpSocket
255
+ /// [`set_nonblocking`]: fn@std::net::UdpSocket::set_nonblocking
256
+ pub fn into_std(self) -> io::Result<std::net::UdpSocket> {
257
+ #[cfg(unix)]
258
+ {
259
+ use std::os::unix::io::{FromRawFd, IntoRawFd};
260
+ self.io
261
+ .into_inner()
262
+ .map(IntoRawFd::into_raw_fd)
263
+ .map(|raw_fd| unsafe { std::net::UdpSocket::from_raw_fd(raw_fd) })
264
+ }
265
+
266
+ #[cfg(windows)]
267
+ {
268
+ use std::os::windows::io::{FromRawSocket, IntoRawSocket};
269
+ self.io
270
+ .into_inner()
271
+ .map(|io| io.into_raw_socket())
272
+ .map(|raw_socket| unsafe { std::net::UdpSocket::from_raw_socket(raw_socket) })
273
+ }
274
+ }
275
+
276
+ fn as_socket(&self) -> socket2::SockRef<'_> {
277
+ socket2::SockRef::from(self)
278
+ }
279
+
280
+ /// Returns the local address that this socket is bound to.
281
+ ///
282
+ /// # Example
283
+ ///
284
+ /// ```no_run
285
+ /// use tokio::net::UdpSocket;
286
+ /// # use std::{io, net::SocketAddr};
287
+ ///
288
+ /// # #[tokio::main]
289
+ /// # async fn main() -> io::Result<()> {
290
+ /// let addr = "0.0.0.0:8080".parse::<SocketAddr>().unwrap();
291
+ /// let sock = UdpSocket::bind(addr).await?;
292
+ /// // the address the socket is bound to
293
+ /// let local_addr = sock.local_addr()?;
294
+ /// # Ok(())
295
+ /// # }
296
+ /// ```
297
+ pub fn local_addr(&self) -> io::Result<SocketAddr> {
298
+ self.io.local_addr()
299
+ }
300
+
301
+ /// Returns the socket address of the remote peer this socket was connected to.
302
+ ///
303
+ /// # Example
304
+ ///
305
+ /// ```
306
+ /// use tokio::net::UdpSocket;
307
+ ///
308
+ /// # use std::{io, net::SocketAddr};
309
+ /// # #[tokio::main]
310
+ /// # async fn main() -> io::Result<()> {
311
+ /// # if cfg!(miri) { return Ok(()); } // No `socket` in miri.
312
+ /// let addr = "0.0.0.0:8080".parse::<SocketAddr>().unwrap();
313
+ /// let peer = "127.0.0.1:11100".parse::<SocketAddr>().unwrap();
314
+ /// let sock = UdpSocket::bind(addr).await?;
315
+ /// sock.connect(peer).await?;
316
+ /// assert_eq!(peer, sock.peer_addr()?);
317
+ /// # Ok(())
318
+ /// # }
319
+ /// ```
320
+ pub fn peer_addr(&self) -> io::Result<SocketAddr> {
321
+ self.io.peer_addr()
322
+ }
323
+
324
+ /// Connects the UDP socket setting the default destination for send() and
325
+ /// limiting packets that are read via `recv` from the address specified in
326
+ /// `addr`.
327
+ ///
328
+ /// # Example
329
+ ///
330
+ /// ```no_run
331
+ /// use tokio::net::UdpSocket;
332
+ /// # use std::{io, net::SocketAddr};
333
+ ///
334
+ /// # #[tokio::main]
335
+ /// # async fn main() -> io::Result<()> {
336
+ /// let sock = UdpSocket::bind("0.0.0.0:8080".parse::<SocketAddr>().unwrap()).await?;
337
+ ///
338
+ /// let remote_addr = "127.0.0.1:59600".parse::<SocketAddr>().unwrap();
339
+ /// sock.connect(remote_addr).await?;
340
+ /// let mut buf = [0u8; 32];
341
+ /// // recv from remote_addr
342
+ /// let len = sock.recv(&mut buf).await?;
343
+ /// // send to remote_addr
344
+ /// let _len = sock.send(&buf[..len]).await?;
345
+ /// # Ok(())
346
+ /// # }
347
+ /// ```
348
+ pub async fn connect<A: ToSocketAddrs>(&self, addr: A) -> io::Result<()> {
349
+ let addrs = to_socket_addrs(addr).await?;
350
+ let mut last_err = None;
351
+
352
+ for addr in addrs {
353
+ match self.io.connect(addr) {
354
+ Ok(()) => return Ok(()),
355
+ Err(e) => last_err = Some(e),
356
+ }
357
+ }
358
+
359
+ Err(last_err.unwrap_or_else(|| {
360
+ io::Error::new(
361
+ io::ErrorKind::InvalidInput,
362
+ "could not resolve to any address",
363
+ )
364
+ }))
365
+ }
366
+
367
+ /// Waits for any of the requested ready states.
368
+ ///
369
+ /// This function is usually paired with `try_recv()` or `try_send()`. It
370
+ /// can be used to concurrently `recv` / `send` to the same socket on a single
371
+ /// task without splitting the socket.
372
+ ///
373
+ /// The function may complete without the socket being ready. This is a
374
+ /// false-positive and attempting an operation will return with
375
+ /// `io::ErrorKind::WouldBlock`. The function can also return with an empty
376
+ /// [`Ready`] set, so you should always check the returned value and possibly
377
+ /// wait again if the requested states are not set.
378
+ ///
379
+ /// # Cancel safety
380
+ ///
381
+ /// This method is cancel safe. Once a readiness event occurs, the method
382
+ /// will continue to return immediately until the readiness event is
383
+ /// consumed by an attempt to read or write that fails with `WouldBlock` or
384
+ /// `Poll::Pending`.
385
+ ///
386
+ /// # Examples
387
+ ///
388
+ /// Concurrently receive from and send to the socket on the same task
389
+ /// without splitting.
390
+ ///
391
+ /// ```no_run
392
+ /// use tokio::io::{self, Interest};
393
+ /// use tokio::net::UdpSocket;
394
+ ///
395
+ /// #[tokio::main]
396
+ /// async fn main() -> io::Result<()> {
397
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
398
+ /// socket.connect("127.0.0.1:8081").await?;
399
+ ///
400
+ /// loop {
401
+ /// let ready = socket.ready(Interest::READABLE | Interest::WRITABLE).await?;
402
+ ///
403
+ /// if ready.is_readable() {
404
+ /// // The buffer is **not** included in the async task and will only exist
405
+ /// // on the stack.
406
+ /// let mut data = [0; 1024];
407
+ /// match socket.try_recv(&mut data[..]) {
408
+ /// Ok(n) => {
409
+ /// println!("received {:?}", &data[..n]);
410
+ /// }
411
+ /// // False-positive, continue
412
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {}
413
+ /// Err(e) => {
414
+ /// return Err(e);
415
+ /// }
416
+ /// }
417
+ /// }
418
+ ///
419
+ /// if ready.is_writable() {
420
+ /// // Write some data
421
+ /// match socket.try_send(b"hello world") {
422
+ /// Ok(n) => {
423
+ /// println!("sent {} bytes", n);
424
+ /// }
425
+ /// // False-positive, continue
426
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {}
427
+ /// Err(e) => {
428
+ /// return Err(e);
429
+ /// }
430
+ /// }
431
+ /// }
432
+ /// }
433
+ /// }
434
+ /// ```
435
+ pub async fn ready(&self, interest: Interest) -> io::Result<Ready> {
436
+ let event = self.io.registration().readiness(interest).await?;
437
+ Ok(event.ready)
438
+ }
439
+
440
+ /// Waits for the socket to become writable.
441
+ ///
442
+ /// This function is equivalent to `ready(Interest::WRITABLE)` and is
443
+ /// usually paired with `try_send()` or `try_send_to()`.
444
+ ///
445
+ /// The function may complete without the socket being writable. This is a
446
+ /// false-positive and attempting a `try_send()` will return with
447
+ /// `io::ErrorKind::WouldBlock`.
448
+ ///
449
+ /// # Cancel safety
450
+ ///
451
+ /// This method is cancel safe. Once a readiness event occurs, the method
452
+ /// will continue to return immediately until the readiness event is
453
+ /// consumed by an attempt to write that fails with `WouldBlock` or
454
+ /// `Poll::Pending`.
455
+ ///
456
+ /// # Examples
457
+ ///
458
+ /// ```no_run
459
+ /// use tokio::net::UdpSocket;
460
+ /// use std::io;
461
+ ///
462
+ /// #[tokio::main]
463
+ /// async fn main() -> io::Result<()> {
464
+ /// // Bind socket
465
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
466
+ /// socket.connect("127.0.0.1:8081").await?;
467
+ ///
468
+ /// loop {
469
+ /// // Wait for the socket to be writable
470
+ /// socket.writable().await?;
471
+ ///
472
+ /// // Try to send data, this may still fail with `WouldBlock`
473
+ /// // if the readiness event is a false positive.
474
+ /// match socket.try_send(b"hello world") {
475
+ /// Ok(n) => {
476
+ /// break;
477
+ /// }
478
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
479
+ /// continue;
480
+ /// }
481
+ /// Err(e) => {
482
+ /// return Err(e);
483
+ /// }
484
+ /// }
485
+ /// }
486
+ ///
487
+ /// Ok(())
488
+ /// }
489
+ /// ```
490
+ pub async fn writable(&self) -> io::Result<()> {
491
+ self.ready(Interest::WRITABLE).await?;
492
+ Ok(())
493
+ }
494
+
495
+ /// Polls for write/send readiness.
496
+ ///
497
+ /// If the udp stream is not currently ready for sending, this method will
498
+ /// store a clone of the `Waker` from the provided `Context`. When the udp
499
+ /// stream becomes ready for sending, `Waker::wake` will be called on the
500
+ /// waker.
501
+ ///
502
+ /// Note that on multiple calls to `poll_send_ready` or `poll_send`, only
503
+ /// the `Waker` from the `Context` passed to the most recent call is
504
+ /// scheduled to receive a wakeup. (However, `poll_recv_ready` retains a
505
+ /// second, independent waker.)
506
+ ///
507
+ /// This function is intended for cases where creating and pinning a future
508
+ /// via [`writable`] is not feasible. Where possible, using [`writable`] is
509
+ /// preferred, as this supports polling from multiple tasks at once.
510
+ ///
511
+ /// # Return value
512
+ ///
513
+ /// The function returns:
514
+ ///
515
+ /// * `Poll::Pending` if the udp stream is not ready for writing.
516
+ /// * `Poll::Ready(Ok(()))` if the udp stream is ready for writing.
517
+ /// * `Poll::Ready(Err(e))` if an error is encountered.
518
+ ///
519
+ /// # Errors
520
+ ///
521
+ /// This function may encounter any standard I/O error except `WouldBlock`.
522
+ ///
523
+ /// [`writable`]: method@Self::writable
524
+ pub fn poll_send_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
525
+ self.io.registration().poll_write_ready(cx).map_ok(|_| ())
526
+ }
527
+
528
+ /// Sends data on the socket to the remote address that the socket is
529
+ /// connected to.
530
+ ///
531
+ /// The [`connect`] method will connect this socket to a remote address.
532
+ /// This method will fail if the socket is not connected.
533
+ ///
534
+ /// [`connect`]: method@Self::connect
535
+ ///
536
+ /// # Return
537
+ ///
538
+ /// On success, the number of bytes sent is returned, otherwise, the
539
+ /// encountered error is returned.
540
+ ///
541
+ /// # Cancel safety
542
+ ///
543
+ /// This method is cancel safe. If `send` is used as the event in a
544
+ /// [`tokio::select!`](crate::select) statement and some other branch
545
+ /// completes first, then it is guaranteed that the message was not sent.
546
+ ///
547
+ /// # Examples
548
+ ///
549
+ /// ```no_run
550
+ /// use tokio::io;
551
+ /// use tokio::net::UdpSocket;
552
+ ///
553
+ /// #[tokio::main]
554
+ /// async fn main() -> io::Result<()> {
555
+ /// // Bind socket
556
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
557
+ /// socket.connect("127.0.0.1:8081").await?;
558
+ ///
559
+ /// // Send a message
560
+ /// socket.send(b"hello world").await?;
561
+ ///
562
+ /// Ok(())
563
+ /// }
564
+ /// ```
565
+ pub async fn send(&self, buf: &[u8]) -> io::Result<usize> {
566
+ self.io
567
+ .registration()
568
+ .async_io(Interest::WRITABLE, || self.io.send(buf))
569
+ .await
570
+ }
571
+
572
+ /// Attempts to send data on the socket to the remote address to which it
573
+ /// was previously `connect`ed.
574
+ ///
575
+ /// The [`connect`] method will connect this socket to a remote address.
576
+ /// This method will fail if the socket is not connected.
577
+ ///
578
+ /// Note that on multiple calls to a `poll_*` method in the send direction,
579
+ /// only the `Waker` from the `Context` passed to the most recent call will
580
+ /// be scheduled to receive a wakeup.
581
+ ///
582
+ /// # Return value
583
+ ///
584
+ /// The function returns:
585
+ ///
586
+ /// * `Poll::Pending` if the socket is not available to write
587
+ /// * `Poll::Ready(Ok(n))` `n` is the number of bytes sent
588
+ /// * `Poll::Ready(Err(e))` if an error is encountered.
589
+ ///
590
+ /// # Errors
591
+ ///
592
+ /// This function may encounter any standard I/O error except `WouldBlock`.
593
+ ///
594
+ /// [`connect`]: method@Self::connect
595
+ pub fn poll_send(&self, cx: &mut Context<'_>, buf: &[u8]) -> Poll<io::Result<usize>> {
596
+ self.io
597
+ .registration()
598
+ .poll_write_io(cx, || self.io.send(buf))
599
+ }
600
+
601
+ /// Tries to send data on the socket to the remote address to which it is
602
+ /// connected.
603
+ ///
604
+ /// When the socket buffer is full, `Err(io::ErrorKind::WouldBlock)` is
605
+ /// returned. This function is usually paired with `writable()`.
606
+ ///
607
+ /// # Returns
608
+ ///
609
+ /// If successful, `Ok(n)` is returned, where `n` is the number of bytes
610
+ /// sent. If the socket is not ready to send data,
611
+ /// `Err(ErrorKind::WouldBlock)` is returned.
612
+ ///
613
+ /// # Examples
614
+ ///
615
+ /// ```no_run
616
+ /// use tokio::net::UdpSocket;
617
+ /// use std::io;
618
+ ///
619
+ /// #[tokio::main]
620
+ /// async fn main() -> io::Result<()> {
621
+ /// // Bind a UDP socket
622
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
623
+ ///
624
+ /// // Connect to a peer
625
+ /// socket.connect("127.0.0.1:8081").await?;
626
+ ///
627
+ /// loop {
628
+ /// // Wait for the socket to be writable
629
+ /// socket.writable().await?;
630
+ ///
631
+ /// // Try to send data, this may still fail with `WouldBlock`
632
+ /// // if the readiness event is a false positive.
633
+ /// match socket.try_send(b"hello world") {
634
+ /// Ok(n) => {
635
+ /// break;
636
+ /// }
637
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
638
+ /// continue;
639
+ /// }
640
+ /// Err(e) => {
641
+ /// return Err(e);
642
+ /// }
643
+ /// }
644
+ /// }
645
+ ///
646
+ /// Ok(())
647
+ /// }
648
+ /// ```
649
+ pub fn try_send(&self, buf: &[u8]) -> io::Result<usize> {
650
+ self.io
651
+ .registration()
652
+ .try_io(Interest::WRITABLE, || self.io.send(buf))
653
+ }
654
+
655
+ /// Waits for the socket to become readable.
656
+ ///
657
+ /// This function is equivalent to `ready(Interest::READABLE)` and is usually
658
+ /// paired with `try_recv()`.
659
+ ///
660
+ /// The function may complete without the socket being readable. This is a
661
+ /// false-positive and attempting a `try_recv()` will return with
662
+ /// `io::ErrorKind::WouldBlock`.
663
+ ///
664
+ /// # Cancel safety
665
+ ///
666
+ /// This method is cancel safe. Once a readiness event occurs, the method
667
+ /// will continue to return immediately until the readiness event is
668
+ /// consumed by an attempt to read that fails with `WouldBlock` or
669
+ /// `Poll::Pending`.
670
+ ///
671
+ /// # Examples
672
+ ///
673
+ /// ```no_run
674
+ /// use tokio::net::UdpSocket;
675
+ /// use std::io;
676
+ ///
677
+ /// #[tokio::main]
678
+ /// async fn main() -> io::Result<()> {
679
+ /// // Connect to a peer
680
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
681
+ /// socket.connect("127.0.0.1:8081").await?;
682
+ ///
683
+ /// loop {
684
+ /// // Wait for the socket to be readable
685
+ /// socket.readable().await?;
686
+ ///
687
+ /// // The buffer is **not** included in the async task and will
688
+ /// // only exist on the stack.
689
+ /// let mut buf = [0; 1024];
690
+ ///
691
+ /// // Try to recv data, this may still fail with `WouldBlock`
692
+ /// // if the readiness event is a false positive.
693
+ /// match socket.try_recv(&mut buf) {
694
+ /// Ok(n) => {
695
+ /// println!("GOT {:?}", &buf[..n]);
696
+ /// break;
697
+ /// }
698
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
699
+ /// continue;
700
+ /// }
701
+ /// Err(e) => {
702
+ /// return Err(e);
703
+ /// }
704
+ /// }
705
+ /// }
706
+ ///
707
+ /// Ok(())
708
+ /// }
709
+ /// ```
710
+ pub async fn readable(&self) -> io::Result<()> {
711
+ self.ready(Interest::READABLE).await?;
712
+ Ok(())
713
+ }
714
+
715
+ /// Polls for read/receive readiness.
716
+ ///
717
+ /// If the udp stream is not currently ready for receiving, this method will
718
+ /// store a clone of the `Waker` from the provided `Context`. When the udp
719
+ /// socket becomes ready for reading, `Waker::wake` will be called on the
720
+ /// waker.
721
+ ///
722
+ /// Note that on multiple calls to `poll_recv_ready`, `poll_recv` or
723
+ /// `poll_peek`, only the `Waker` from the `Context` passed to the most
724
+ /// recent call is scheduled to receive a wakeup. (However,
725
+ /// `poll_send_ready` retains a second, independent waker.)
726
+ ///
727
+ /// This function is intended for cases where creating and pinning a future
728
+ /// via [`readable`] is not feasible. Where possible, using [`readable`] is
729
+ /// preferred, as this supports polling from multiple tasks at once.
730
+ ///
731
+ /// # Return value
732
+ ///
733
+ /// The function returns:
734
+ ///
735
+ /// * `Poll::Pending` if the udp stream is not ready for reading.
736
+ /// * `Poll::Ready(Ok(()))` if the udp stream is ready for reading.
737
+ /// * `Poll::Ready(Err(e))` if an error is encountered.
738
+ ///
739
+ /// # Errors
740
+ ///
741
+ /// This function may encounter any standard I/O error except `WouldBlock`.
742
+ ///
743
+ /// [`readable`]: method@Self::readable
744
+ pub fn poll_recv_ready(&self, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
745
+ self.io.registration().poll_read_ready(cx).map_ok(|_| ())
746
+ }
747
+
748
+ /// Receives a single datagram message on the socket from the remote address
749
+ /// to which it is connected. On success, returns the number of bytes read.
750
+ ///
751
+ /// The function must be called with valid byte array `buf` of sufficient
752
+ /// size to hold the message bytes. If a message is too long to fit in the
753
+ /// supplied buffer, excess bytes may be discarded.
754
+ ///
755
+ /// The [`connect`] method will connect this socket to a remote address.
756
+ /// This method will fail if the socket is not connected.
757
+ ///
758
+ /// # Cancel safety
759
+ ///
760
+ /// This method is cancel safe. If `recv` is used as the event in a
761
+ /// [`tokio::select!`](crate::select) statement and some other branch
762
+ /// completes first, it is guaranteed that no messages were received on this
763
+ /// socket.
764
+ ///
765
+ /// [`connect`]: method@Self::connect
766
+ ///
767
+ /// ```no_run
768
+ /// use tokio::net::UdpSocket;
769
+ /// use std::io;
770
+ ///
771
+ /// #[tokio::main]
772
+ /// async fn main() -> io::Result<()> {
773
+ /// // Bind socket
774
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
775
+ /// socket.connect("127.0.0.1:8081").await?;
776
+ ///
777
+ /// let mut buf = vec![0; 10];
778
+ /// let n = socket.recv(&mut buf).await?;
779
+ ///
780
+ /// println!("received {} bytes {:?}", n, &buf[..n]);
781
+ ///
782
+ /// Ok(())
783
+ /// }
784
+ /// ```
785
+ pub async fn recv(&self, buf: &mut [u8]) -> io::Result<usize> {
786
+ self.io
787
+ .registration()
788
+ .async_io(Interest::READABLE, || self.io.recv(buf))
789
+ .await
790
+ }
791
+
792
+ /// Attempts to receive a single datagram message on the socket from the remote
793
+ /// address to which it is `connect`ed.
794
+ ///
795
+ /// The [`connect`] method will connect this socket to a remote address. This method
796
+ /// resolves to an error if the socket is not connected.
797
+ ///
798
+ /// Note that on multiple calls to a `poll_*` method in the `recv` direction, only the
799
+ /// `Waker` from the `Context` passed to the most recent call will be scheduled to
800
+ /// receive a wakeup.
801
+ ///
802
+ /// # Return value
803
+ ///
804
+ /// The function returns:
805
+ ///
806
+ /// * `Poll::Pending` if the socket is not ready to read
807
+ /// * `Poll::Ready(Ok(()))` reads data `ReadBuf` if the socket is ready
808
+ /// * `Poll::Ready(Err(e))` if an error is encountered.
809
+ ///
810
+ /// # Errors
811
+ ///
812
+ /// This function may encounter any standard I/O error except `WouldBlock`.
813
+ ///
814
+ /// [`connect`]: method@Self::connect
815
+ pub fn poll_recv(&self, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>) -> Poll<io::Result<()>> {
816
+ #[allow(clippy::blocks_in_conditions)]
817
+ let n = ready!(self.io.registration().poll_read_io(cx, || {
818
+ // Safety: will not read the maybe uninitialized bytes.
819
+ let b = unsafe {
820
+ &mut *(buf.unfilled_mut() as *mut [std::mem::MaybeUninit<u8>] as *mut [u8])
821
+ };
822
+
823
+ self.io.recv(b)
824
+ }))?;
825
+
826
+ // Safety: We trust `recv` to have filled up `n` bytes in the buffer.
827
+ unsafe {
828
+ buf.assume_init(n);
829
+ }
830
+ buf.advance(n);
831
+ Poll::Ready(Ok(()))
832
+ }
833
+
834
+ /// Tries to receive a single datagram message on the socket from the remote
835
+ /// address to which it is connected. On success, returns the number of
836
+ /// bytes read.
837
+ ///
838
+ /// This method must be called with valid byte array `buf` of sufficient size
839
+ /// to hold the message bytes. If a message is too long to fit in the
840
+ /// supplied buffer, excess bytes may be discarded.
841
+ ///
842
+ /// When there is no pending data, `Err(io::ErrorKind::WouldBlock)` is
843
+ /// returned. This function is usually paired with `readable()`.
844
+ ///
845
+ /// # Examples
846
+ ///
847
+ /// ```no_run
848
+ /// use tokio::net::UdpSocket;
849
+ /// use std::io;
850
+ ///
851
+ /// #[tokio::main]
852
+ /// async fn main() -> io::Result<()> {
853
+ /// // Connect to a peer
854
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
855
+ /// socket.connect("127.0.0.1:8081").await?;
856
+ ///
857
+ /// loop {
858
+ /// // Wait for the socket to be readable
859
+ /// socket.readable().await?;
860
+ ///
861
+ /// // The buffer is **not** included in the async task and will
862
+ /// // only exist on the stack.
863
+ /// let mut buf = [0; 1024];
864
+ ///
865
+ /// // Try to recv data, this may still fail with `WouldBlock`
866
+ /// // if the readiness event is a false positive.
867
+ /// match socket.try_recv(&mut buf) {
868
+ /// Ok(n) => {
869
+ /// println!("GOT {:?}", &buf[..n]);
870
+ /// break;
871
+ /// }
872
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
873
+ /// continue;
874
+ /// }
875
+ /// Err(e) => {
876
+ /// return Err(e);
877
+ /// }
878
+ /// }
879
+ /// }
880
+ ///
881
+ /// Ok(())
882
+ /// }
883
+ /// ```
884
+ pub fn try_recv(&self, buf: &mut [u8]) -> io::Result<usize> {
885
+ self.io
886
+ .registration()
887
+ .try_io(Interest::READABLE, || self.io.recv(buf))
888
+ }
889
+
890
+ cfg_io_util! {
891
+ /// Tries to receive data from the stream into the provided buffer, advancing the
892
+ /// buffer's internal cursor, returning how many bytes were read.
893
+ ///
894
+ /// This method must be called with valid byte array `buf` of sufficient size
895
+ /// to hold the message bytes. If a message is too long to fit in the
896
+ /// supplied buffer, excess bytes may be discarded.
897
+ ///
898
+ /// This method can be used even if `buf` is uninitialized.
899
+ ///
900
+ /// When there is no pending data, `Err(io::ErrorKind::WouldBlock)` is
901
+ /// returned. This function is usually paired with `readable()`.
902
+ ///
903
+ /// # Examples
904
+ ///
905
+ /// ```no_run
906
+ /// use tokio::net::UdpSocket;
907
+ /// use std::io;
908
+ ///
909
+ /// #[tokio::main]
910
+ /// async fn main() -> io::Result<()> {
911
+ /// // Connect to a peer
912
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
913
+ /// socket.connect("127.0.0.1:8081").await?;
914
+ ///
915
+ /// loop {
916
+ /// // Wait for the socket to be readable
917
+ /// socket.readable().await?;
918
+ ///
919
+ /// let mut buf = Vec::with_capacity(1024);
920
+ ///
921
+ /// // Try to recv data, this may still fail with `WouldBlock`
922
+ /// // if the readiness event is a false positive.
923
+ /// match socket.try_recv_buf(&mut buf) {
924
+ /// Ok(n) => {
925
+ /// println!("GOT {:?}", &buf[..n]);
926
+ /// break;
927
+ /// }
928
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
929
+ /// continue;
930
+ /// }
931
+ /// Err(e) => {
932
+ /// return Err(e);
933
+ /// }
934
+ /// }
935
+ /// }
936
+ ///
937
+ /// Ok(())
938
+ /// }
939
+ /// ```
940
+ pub fn try_recv_buf<B: BufMut>(&self, buf: &mut B) -> io::Result<usize> {
941
+ self.io.registration().try_io(Interest::READABLE, || {
942
+ let dst = buf.chunk_mut();
943
+ let dst =
944
+ unsafe { &mut *(dst as *mut _ as *mut [std::mem::MaybeUninit<u8>] as *mut [u8]) };
945
+
946
+ let n = (*self.io).recv(dst)?;
947
+
948
+ // Safety: We trust `UdpSocket::recv` to have filled up `n` bytes in the
949
+ // buffer.
950
+ unsafe {
951
+ buf.advance_mut(n);
952
+ }
953
+
954
+ Ok(n)
955
+ })
956
+ }
957
+
958
+ /// Receives a single datagram message on the socket from the remote address
959
+ /// to which it is connected, advancing the buffer's internal cursor,
960
+ /// returning how many bytes were read.
961
+ ///
962
+ /// This method must be called with valid byte array `buf` of sufficient size
963
+ /// to hold the message bytes. If a message is too long to fit in the
964
+ /// supplied buffer, excess bytes may be discarded.
965
+ ///
966
+ /// This method can be used even if `buf` is uninitialized.
967
+ ///
968
+ /// # Examples
969
+ ///
970
+ /// ```no_run
971
+ /// use tokio::net::UdpSocket;
972
+ /// use std::io;
973
+ ///
974
+ /// #[tokio::main]
975
+ /// async fn main() -> io::Result<()> {
976
+ /// // Connect to a peer
977
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
978
+ /// socket.connect("127.0.0.1:8081").await?;
979
+ ///
980
+ /// let mut buf = Vec::with_capacity(512);
981
+ /// let len = socket.recv_buf(&mut buf).await?;
982
+ ///
983
+ /// println!("received {} bytes {:?}", len, &buf[..len]);
984
+ ///
985
+ /// Ok(())
986
+ /// }
987
+ /// ```
988
+ pub async fn recv_buf<B: BufMut>(&self, buf: &mut B) -> io::Result<usize> {
989
+ self.io.registration().async_io(Interest::READABLE, || {
990
+ let dst = buf.chunk_mut();
991
+ let dst =
992
+ unsafe { &mut *(dst as *mut _ as *mut [std::mem::MaybeUninit<u8>] as *mut [u8]) };
993
+
994
+ let n = (*self.io).recv(dst)?;
995
+
996
+ // Safety: We trust `UdpSocket::recv` to have filled up `n` bytes in the
997
+ // buffer.
998
+ unsafe {
999
+ buf.advance_mut(n);
1000
+ }
1001
+
1002
+ Ok(n)
1003
+ }).await
1004
+ }
1005
+
1006
+ /// Tries to receive a single datagram message on the socket. On success,
1007
+ /// returns the number of bytes read and the origin.
1008
+ ///
1009
+ /// This method must be called with valid byte array `buf` of sufficient size
1010
+ /// to hold the message bytes. If a message is too long to fit in the
1011
+ /// supplied buffer, excess bytes may be discarded.
1012
+ ///
1013
+ /// This method can be used even if `buf` is uninitialized.
1014
+ ///
1015
+ /// When there is no pending data, `Err(io::ErrorKind::WouldBlock)` is
1016
+ /// returned. This function is usually paired with `readable()`.
1017
+ ///
1018
+ /// # Notes
1019
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1020
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1021
+ /// Because UDP is stateless and does not validate the origin of a packet,
1022
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1023
+ /// It is important to be aware of this when designing your application-level protocol.
1024
+ ///
1025
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1026
+ ///
1027
+ /// # Examples
1028
+ ///
1029
+ /// ```no_run
1030
+ /// use tokio::net::UdpSocket;
1031
+ /// use std::io;
1032
+ ///
1033
+ /// #[tokio::main]
1034
+ /// async fn main() -> io::Result<()> {
1035
+ /// // Connect to a peer
1036
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
1037
+ ///
1038
+ /// loop {
1039
+ /// // Wait for the socket to be readable
1040
+ /// socket.readable().await?;
1041
+ ///
1042
+ /// let mut buf = Vec::with_capacity(1024);
1043
+ ///
1044
+ /// // Try to recv data, this may still fail with `WouldBlock`
1045
+ /// // if the readiness event is a false positive.
1046
+ /// match socket.try_recv_buf_from(&mut buf) {
1047
+ /// Ok((n, _addr)) => {
1048
+ /// println!("GOT {:?}", &buf[..n]);
1049
+ /// break;
1050
+ /// }
1051
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
1052
+ /// continue;
1053
+ /// }
1054
+ /// Err(e) => {
1055
+ /// return Err(e);
1056
+ /// }
1057
+ /// }
1058
+ /// }
1059
+ ///
1060
+ /// Ok(())
1061
+ /// }
1062
+ /// ```
1063
+ pub fn try_recv_buf_from<B: BufMut>(&self, buf: &mut B) -> io::Result<(usize, SocketAddr)> {
1064
+ self.io.registration().try_io(Interest::READABLE, || {
1065
+ let dst = buf.chunk_mut();
1066
+ let dst =
1067
+ unsafe { &mut *(dst as *mut _ as *mut [std::mem::MaybeUninit<u8>] as *mut [u8]) };
1068
+
1069
+ let (n, addr) = (*self.io).recv_from(dst)?;
1070
+
1071
+ // Safety: We trust `UdpSocket::recv_from` to have filled up `n` bytes in the
1072
+ // buffer.
1073
+ unsafe {
1074
+ buf.advance_mut(n);
1075
+ }
1076
+
1077
+ Ok((n, addr))
1078
+ })
1079
+ }
1080
+
1081
+ /// Receives a single datagram message on the socket, advancing the
1082
+ /// buffer's internal cursor, returning how many bytes were read and the origin.
1083
+ ///
1084
+ /// This method must be called with valid byte array `buf` of sufficient size
1085
+ /// to hold the message bytes. If a message is too long to fit in the
1086
+ /// supplied buffer, excess bytes may be discarded.
1087
+ ///
1088
+ /// This method can be used even if `buf` is uninitialized.
1089
+ ///
1090
+ /// # Notes
1091
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1092
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1093
+ /// Because UDP is stateless and does not validate the origin of a packet,
1094
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1095
+ /// It is important to be aware of this when designing your application-level protocol.
1096
+ ///
1097
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1098
+ ///
1099
+ /// # Examples
1100
+ ///
1101
+ /// ```no_run
1102
+ /// use tokio::net::UdpSocket;
1103
+ /// use std::io;
1104
+ ///
1105
+ /// #[tokio::main]
1106
+ /// async fn main() -> io::Result<()> {
1107
+ /// // Connect to a peer
1108
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
1109
+ /// socket.connect("127.0.0.1:8081").await?;
1110
+ ///
1111
+ /// let mut buf = Vec::with_capacity(512);
1112
+ /// let (len, addr) = socket.recv_buf_from(&mut buf).await?;
1113
+ ///
1114
+ /// println!("received {:?} bytes from {:?}", len, addr);
1115
+ ///
1116
+ /// Ok(())
1117
+ /// }
1118
+ /// ```
1119
+ pub async fn recv_buf_from<B: BufMut>(&self, buf: &mut B) -> io::Result<(usize, SocketAddr)> {
1120
+ self.io.registration().async_io(Interest::READABLE, || {
1121
+ let dst = buf.chunk_mut();
1122
+ let dst =
1123
+ unsafe { &mut *(dst as *mut _ as *mut [std::mem::MaybeUninit<u8>] as *mut [u8]) };
1124
+
1125
+ let (n, addr) = (*self.io).recv_from(dst)?;
1126
+
1127
+ // Safety: We trust `UdpSocket::recv_from` to have filled up `n` bytes in the
1128
+ // buffer.
1129
+ unsafe {
1130
+ buf.advance_mut(n);
1131
+ }
1132
+
1133
+ Ok((n,addr))
1134
+ }).await
1135
+ }
1136
+ }
1137
+
1138
+ /// Sends data on the socket to the given address. On success, returns the
1139
+ /// number of bytes written.
1140
+ ///
1141
+ /// Address type can be any implementor of [`ToSocketAddrs`] trait. See its
1142
+ /// documentation for concrete examples.
1143
+ ///
1144
+ /// It is possible for `addr` to yield multiple addresses, but `send_to`
1145
+ /// will only send data to the first address yielded by `addr`.
1146
+ ///
1147
+ /// This will return an error when the IP version of the local socket does
1148
+ /// not match that returned from [`ToSocketAddrs`].
1149
+ ///
1150
+ /// [`ToSocketAddrs`]: crate::net::ToSocketAddrs
1151
+ ///
1152
+ /// # Cancel safety
1153
+ ///
1154
+ /// This method is cancel safe. If `send_to` is used as the event in a
1155
+ /// [`tokio::select!`](crate::select) statement and some other branch
1156
+ /// completes first, then it is guaranteed that the message was not sent.
1157
+ ///
1158
+ /// # Example
1159
+ ///
1160
+ /// ```no_run
1161
+ /// use tokio::net::UdpSocket;
1162
+ /// use std::io;
1163
+ ///
1164
+ /// #[tokio::main]
1165
+ /// async fn main() -> io::Result<()> {
1166
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
1167
+ /// let len = socket.send_to(b"hello world", "127.0.0.1:8081").await?;
1168
+ ///
1169
+ /// println!("Sent {} bytes", len);
1170
+ ///
1171
+ /// Ok(())
1172
+ /// }
1173
+ /// ```
1174
+ pub async fn send_to<A: ToSocketAddrs>(&self, buf: &[u8], addr: A) -> io::Result<usize> {
1175
+ let mut addrs = to_socket_addrs(addr).await?;
1176
+
1177
+ match addrs.next() {
1178
+ Some(target) => self.send_to_addr(buf, target).await,
1179
+ None => Err(io::Error::new(
1180
+ io::ErrorKind::InvalidInput,
1181
+ "no addresses to send data to",
1182
+ )),
1183
+ }
1184
+ }
1185
+
1186
+ /// Attempts to send data on the socket to a given address.
1187
+ ///
1188
+ /// Note that on multiple calls to a `poll_*` method in the send direction, only the
1189
+ /// `Waker` from the `Context` passed to the most recent call will be scheduled to
1190
+ /// receive a wakeup.
1191
+ ///
1192
+ /// # Return value
1193
+ ///
1194
+ /// The function returns:
1195
+ ///
1196
+ /// * `Poll::Pending` if the socket is not ready to write
1197
+ /// * `Poll::Ready(Ok(n))` `n` is the number of bytes sent.
1198
+ /// * `Poll::Ready(Err(e))` if an error is encountered.
1199
+ ///
1200
+ /// # Errors
1201
+ ///
1202
+ /// This function may encounter any standard I/O error except `WouldBlock`.
1203
+ pub fn poll_send_to(
1204
+ &self,
1205
+ cx: &mut Context<'_>,
1206
+ buf: &[u8],
1207
+ target: SocketAddr,
1208
+ ) -> Poll<io::Result<usize>> {
1209
+ self.io
1210
+ .registration()
1211
+ .poll_write_io(cx, || self.io.send_to(buf, target))
1212
+ }
1213
+
1214
+ /// Tries to send data on the socket to the given address, but if the send is
1215
+ /// blocked this will return right away.
1216
+ ///
1217
+ /// This function is usually paired with `writable()`.
1218
+ ///
1219
+ /// # Returns
1220
+ ///
1221
+ /// If successful, returns the number of bytes sent
1222
+ ///
1223
+ /// Users should ensure that when the remote cannot receive, the
1224
+ /// [`ErrorKind::WouldBlock`] is properly handled. An error can also occur
1225
+ /// if the IP version of the socket does not match that of `target`.
1226
+ ///
1227
+ /// [`ErrorKind::WouldBlock`]: std::io::ErrorKind::WouldBlock
1228
+ ///
1229
+ /// # Example
1230
+ ///
1231
+ /// ```no_run
1232
+ /// use tokio::net::UdpSocket;
1233
+ /// use std::error::Error;
1234
+ /// use std::io;
1235
+ ///
1236
+ /// #[tokio::main]
1237
+ /// async fn main() -> Result<(), Box<dyn Error>> {
1238
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
1239
+ ///
1240
+ /// let dst = "127.0.0.1:8081".parse()?;
1241
+ ///
1242
+ /// loop {
1243
+ /// socket.writable().await?;
1244
+ ///
1245
+ /// match socket.try_send_to(&b"hello world"[..], dst) {
1246
+ /// Ok(sent) => {
1247
+ /// println!("sent {} bytes", sent);
1248
+ /// break;
1249
+ /// }
1250
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
1251
+ /// // Writable false positive.
1252
+ /// continue;
1253
+ /// }
1254
+ /// Err(e) => return Err(e.into()),
1255
+ /// }
1256
+ /// }
1257
+ ///
1258
+ /// Ok(())
1259
+ /// }
1260
+ /// ```
1261
+ pub fn try_send_to(&self, buf: &[u8], target: SocketAddr) -> io::Result<usize> {
1262
+ self.io
1263
+ .registration()
1264
+ .try_io(Interest::WRITABLE, || self.io.send_to(buf, target))
1265
+ }
1266
+
1267
+ async fn send_to_addr(&self, buf: &[u8], target: SocketAddr) -> io::Result<usize> {
1268
+ self.io
1269
+ .registration()
1270
+ .async_io(Interest::WRITABLE, || self.io.send_to(buf, target))
1271
+ .await
1272
+ }
1273
+
1274
+ /// Receives a single datagram message on the socket. On success, returns
1275
+ /// the number of bytes read and the origin.
1276
+ ///
1277
+ /// The function must be called with valid byte array `buf` of sufficient
1278
+ /// size to hold the message bytes. If a message is too long to fit in the
1279
+ /// supplied buffer, excess bytes may be discarded.
1280
+ ///
1281
+ /// # Cancel safety
1282
+ ///
1283
+ /// This method is cancel safe. If `recv_from` is used as the event in a
1284
+ /// [`tokio::select!`](crate::select) statement and some other branch
1285
+ /// completes first, it is guaranteed that no messages were received on this
1286
+ /// socket.
1287
+ ///
1288
+ /// # Example
1289
+ ///
1290
+ /// ```no_run
1291
+ /// use tokio::net::UdpSocket;
1292
+ /// use std::io;
1293
+ ///
1294
+ /// #[tokio::main]
1295
+ /// async fn main() -> io::Result<()> {
1296
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
1297
+ ///
1298
+ /// let mut buf = vec![0u8; 32];
1299
+ /// let (len, addr) = socket.recv_from(&mut buf).await?;
1300
+ ///
1301
+ /// println!("received {:?} bytes from {:?}", len, addr);
1302
+ ///
1303
+ /// Ok(())
1304
+ /// }
1305
+ /// ```
1306
+ ///
1307
+ /// # Notes
1308
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1309
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1310
+ /// Because UDP is stateless and does not validate the origin of a packet,
1311
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1312
+ /// It is important to be aware of this when designing your application-level protocol.
1313
+ ///
1314
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1315
+ pub async fn recv_from(&self, buf: &mut [u8]) -> io::Result<(usize, SocketAddr)> {
1316
+ self.io
1317
+ .registration()
1318
+ .async_io(Interest::READABLE, || self.io.recv_from(buf))
1319
+ .await
1320
+ }
1321
+
1322
+ /// Attempts to receive a single datagram on the socket.
1323
+ ///
1324
+ /// Note that on multiple calls to a `poll_*` method in the `recv` direction, only the
1325
+ /// `Waker` from the `Context` passed to the most recent call will be scheduled to
1326
+ /// receive a wakeup.
1327
+ ///
1328
+ /// # Return value
1329
+ ///
1330
+ /// The function returns:
1331
+ ///
1332
+ /// * `Poll::Pending` if the socket is not ready to read
1333
+ /// * `Poll::Ready(Ok(addr))` reads data from `addr` into `ReadBuf` if the socket is ready
1334
+ /// * `Poll::Ready(Err(e))` if an error is encountered.
1335
+ ///
1336
+ /// # Errors
1337
+ ///
1338
+ /// This function may encounter any standard I/O error except `WouldBlock`.
1339
+ ///
1340
+ /// # Notes
1341
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1342
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1343
+ /// Because UDP is stateless and does not validate the origin of a packet,
1344
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1345
+ /// It is important to be aware of this when designing your application-level protocol.
1346
+ ///
1347
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1348
+ pub fn poll_recv_from(
1349
+ &self,
1350
+ cx: &mut Context<'_>,
1351
+ buf: &mut ReadBuf<'_>,
1352
+ ) -> Poll<io::Result<SocketAddr>> {
1353
+ #[allow(clippy::blocks_in_conditions)]
1354
+ let (n, addr) = ready!(self.io.registration().poll_read_io(cx, || {
1355
+ // Safety: will not read the maybe uninitialized bytes.
1356
+ let b = unsafe {
1357
+ &mut *(buf.unfilled_mut() as *mut [std::mem::MaybeUninit<u8>] as *mut [u8])
1358
+ };
1359
+
1360
+ self.io.recv_from(b)
1361
+ }))?;
1362
+
1363
+ // Safety: We trust `recv` to have filled up `n` bytes in the buffer.
1364
+ unsafe {
1365
+ buf.assume_init(n);
1366
+ }
1367
+ buf.advance(n);
1368
+ Poll::Ready(Ok(addr))
1369
+ }
1370
+
1371
+ /// Tries to receive a single datagram message on the socket. On success,
1372
+ /// returns the number of bytes read and the origin.
1373
+ ///
1374
+ /// This method must be called with valid byte array `buf` of sufficient size
1375
+ /// to hold the message bytes. If a message is too long to fit in the
1376
+ /// supplied buffer, excess bytes may be discarded.
1377
+ ///
1378
+ /// When there is no pending data, `Err(io::ErrorKind::WouldBlock)` is
1379
+ /// returned. This function is usually paired with `readable()`.
1380
+ ///
1381
+ /// # Notes
1382
+ ///
1383
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1384
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1385
+ /// Because UDP is stateless and does not validate the origin of a packet,
1386
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1387
+ /// It is important to be aware of this when designing your application-level protocol.
1388
+ ///
1389
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1390
+ ///
1391
+ /// # Examples
1392
+ ///
1393
+ /// ```no_run
1394
+ /// use tokio::net::UdpSocket;
1395
+ /// use std::io;
1396
+ ///
1397
+ /// #[tokio::main]
1398
+ /// async fn main() -> io::Result<()> {
1399
+ /// // Connect to a peer
1400
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
1401
+ ///
1402
+ /// loop {
1403
+ /// // Wait for the socket to be readable
1404
+ /// socket.readable().await?;
1405
+ ///
1406
+ /// // The buffer is **not** included in the async task and will
1407
+ /// // only exist on the stack.
1408
+ /// let mut buf = [0; 1024];
1409
+ ///
1410
+ /// // Try to recv data, this may still fail with `WouldBlock`
1411
+ /// // if the readiness event is a false positive.
1412
+ /// match socket.try_recv_from(&mut buf) {
1413
+ /// Ok((n, _addr)) => {
1414
+ /// println!("GOT {:?}", &buf[..n]);
1415
+ /// break;
1416
+ /// }
1417
+ /// Err(ref e) if e.kind() == io::ErrorKind::WouldBlock => {
1418
+ /// continue;
1419
+ /// }
1420
+ /// Err(e) => {
1421
+ /// return Err(e);
1422
+ /// }
1423
+ /// }
1424
+ /// }
1425
+ ///
1426
+ /// Ok(())
1427
+ /// }
1428
+ /// ```
1429
+ pub fn try_recv_from(&self, buf: &mut [u8]) -> io::Result<(usize, SocketAddr)> {
1430
+ self.io
1431
+ .registration()
1432
+ .try_io(Interest::READABLE, || self.io.recv_from(buf))
1433
+ }
1434
+
1435
+ /// Tries to read or write from the socket using a user-provided IO operation.
1436
+ ///
1437
+ /// If the socket is ready, the provided closure is called. The closure
1438
+ /// should attempt to perform IO operation on the socket by manually
1439
+ /// calling the appropriate syscall. If the operation fails because the
1440
+ /// socket is not actually ready, then the closure should return a
1441
+ /// `WouldBlock` error and the readiness flag is cleared. The return value
1442
+ /// of the closure is then returned by `try_io`.
1443
+ ///
1444
+ /// If the socket is not ready, then the closure is not called
1445
+ /// and a `WouldBlock` error is returned.
1446
+ ///
1447
+ /// The closure should only return a `WouldBlock` error if it has performed
1448
+ /// an IO operation on the socket that failed due to the socket not being
1449
+ /// ready. Returning a `WouldBlock` error in any other situation will
1450
+ /// incorrectly clear the readiness flag, which can cause the socket to
1451
+ /// behave incorrectly.
1452
+ ///
1453
+ /// The closure should not perform the IO operation using any of the methods
1454
+ /// defined on the Tokio `UdpSocket` type, as this will mess with the
1455
+ /// readiness flag and can cause the socket to behave incorrectly.
1456
+ ///
1457
+ /// This method is not intended to be used with combined interests.
1458
+ /// The closure should perform only one type of IO operation, so it should not
1459
+ /// require more than one ready state. This method may panic or sleep forever
1460
+ /// if it is called with a combined interest.
1461
+ ///
1462
+ /// Usually, [`readable()`], [`writable()`] or [`ready()`] is used with this function.
1463
+ ///
1464
+ /// [`readable()`]: UdpSocket::readable()
1465
+ /// [`writable()`]: UdpSocket::writable()
1466
+ /// [`ready()`]: UdpSocket::ready()
1467
+ pub fn try_io<R>(
1468
+ &self,
1469
+ interest: Interest,
1470
+ f: impl FnOnce() -> io::Result<R>,
1471
+ ) -> io::Result<R> {
1472
+ self.io
1473
+ .registration()
1474
+ .try_io(interest, || self.io.try_io(f))
1475
+ }
1476
+
1477
+ /// Reads or writes from the socket using a user-provided IO operation.
1478
+ ///
1479
+ /// The readiness of the socket is awaited and when the socket is ready,
1480
+ /// the provided closure is called. The closure should attempt to perform
1481
+ /// IO operation on the socket by manually calling the appropriate syscall.
1482
+ /// If the operation fails because the socket is not actually ready,
1483
+ /// then the closure should return a `WouldBlock` error. In such case the
1484
+ /// readiness flag is cleared and the socket readiness is awaited again.
1485
+ /// This loop is repeated until the closure returns an `Ok` or an error
1486
+ /// other than `WouldBlock`.
1487
+ ///
1488
+ /// The closure should only return a `WouldBlock` error if it has performed
1489
+ /// an IO operation on the socket that failed due to the socket not being
1490
+ /// ready. Returning a `WouldBlock` error in any other situation will
1491
+ /// incorrectly clear the readiness flag, which can cause the socket to
1492
+ /// behave incorrectly.
1493
+ ///
1494
+ /// The closure should not perform the IO operation using any of the methods
1495
+ /// defined on the Tokio `UdpSocket` type, as this will mess with the
1496
+ /// readiness flag and can cause the socket to behave incorrectly.
1497
+ ///
1498
+ /// This method is not intended to be used with combined interests.
1499
+ /// The closure should perform only one type of IO operation, so it should not
1500
+ /// require more than one ready state. This method may panic or sleep forever
1501
+ /// if it is called with a combined interest.
1502
+ pub async fn async_io<R>(
1503
+ &self,
1504
+ interest: Interest,
1505
+ mut f: impl FnMut() -> io::Result<R>,
1506
+ ) -> io::Result<R> {
1507
+ self.io
1508
+ .registration()
1509
+ .async_io(interest, || self.io.try_io(&mut f))
1510
+ .await
1511
+ }
1512
+
1513
+ /// Receives a single datagram from the connected address without removing it from the queue.
1514
+ /// On success, returns the number of bytes read from whence the data came.
1515
+ ///
1516
+ /// # Notes
1517
+ ///
1518
+ /// On Windows, if the data is larger than the buffer specified, the buffer
1519
+ /// is filled with the first part of the data, and peek returns the error
1520
+ /// `WSAEMSGSIZE(10040)`. The excess data is lost.
1521
+ /// Make sure to always use a sufficiently large buffer to hold the
1522
+ /// maximum UDP packet size, which can be up to 65536 bytes in size.
1523
+ ///
1524
+ /// MacOS will return an error if you pass a zero-sized buffer.
1525
+ ///
1526
+ /// If you're merely interested in learning the sender of the data at the head of the queue,
1527
+ /// try [`peek_sender`].
1528
+ ///
1529
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1530
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1531
+ /// Because UDP is stateless and does not validate the origin of a packet,
1532
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1533
+ /// It is important to be aware of this when designing your application-level protocol.
1534
+ ///
1535
+ /// # Examples
1536
+ ///
1537
+ /// ```no_run
1538
+ /// use tokio::net::UdpSocket;
1539
+ /// use std::io;
1540
+ ///
1541
+ /// #[tokio::main]
1542
+ /// async fn main() -> io::Result<()> {
1543
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
1544
+ ///
1545
+ /// let mut buf = vec![0u8; 32];
1546
+ /// let len = socket.peek(&mut buf).await?;
1547
+ ///
1548
+ /// println!("peeked {:?} bytes", len);
1549
+ ///
1550
+ /// Ok(())
1551
+ /// }
1552
+ /// ```
1553
+ ///
1554
+ /// [`peek_sender`]: method@Self::peek_sender
1555
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1556
+ pub async fn peek(&self, buf: &mut [u8]) -> io::Result<usize> {
1557
+ self.io
1558
+ .registration()
1559
+ .async_io(Interest::READABLE, || self.io.peek(buf))
1560
+ .await
1561
+ }
1562
+
1563
+ /// Receives data from the connected address, without removing it from the input queue.
1564
+ ///
1565
+ /// # Notes
1566
+ ///
1567
+ /// Note that on multiple calls to a `poll_*` method in the `recv` direction, only the
1568
+ /// `Waker` from the `Context` passed to the most recent call will be scheduled to
1569
+ /// receive a wakeup
1570
+ ///
1571
+ /// On Windows, if the data is larger than the buffer specified, the buffer
1572
+ /// is filled with the first part of the data, and peek returns the error
1573
+ /// `WSAEMSGSIZE(10040)`. The excess data is lost.
1574
+ /// Make sure to always use a sufficiently large buffer to hold the
1575
+ /// maximum UDP packet size, which can be up to 65536 bytes in size.
1576
+ ///
1577
+ /// MacOS will return an error if you pass a zero-sized buffer.
1578
+ ///
1579
+ /// If you're merely interested in learning the sender of the data at the head of the queue,
1580
+ /// try [`poll_peek_sender`].
1581
+ ///
1582
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1583
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1584
+ /// Because UDP is stateless and does not validate the origin of a packet,
1585
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1586
+ /// It is important to be aware of this when designing your application-level protocol.
1587
+ ///
1588
+ /// # Return value
1589
+ ///
1590
+ /// The function returns:
1591
+ ///
1592
+ /// * `Poll::Pending` if the socket is not ready to read
1593
+ /// * `Poll::Ready(Ok(()))` reads data into `ReadBuf` if the socket is ready
1594
+ /// * `Poll::Ready(Err(e))` if an error is encountered.
1595
+ ///
1596
+ /// # Errors
1597
+ ///
1598
+ /// This function may encounter any standard I/O error except `WouldBlock`.
1599
+ ///
1600
+ /// [`poll_peek_sender`]: method@Self::poll_peek_sender
1601
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1602
+ pub fn poll_peek(&self, cx: &mut Context<'_>, buf: &mut ReadBuf<'_>) -> Poll<io::Result<()>> {
1603
+ #[allow(clippy::blocks_in_conditions)]
1604
+ let n = ready!(self.io.registration().poll_read_io(cx, || {
1605
+ // Safety: will not read the maybe uninitialized bytes.
1606
+ let b = unsafe {
1607
+ &mut *(buf.unfilled_mut() as *mut [std::mem::MaybeUninit<u8>] as *mut [u8])
1608
+ };
1609
+
1610
+ self.io.peek(b)
1611
+ }))?;
1612
+
1613
+ // Safety: We trust `peek` to have filled up `n` bytes in the buffer.
1614
+ unsafe {
1615
+ buf.assume_init(n);
1616
+ }
1617
+ buf.advance(n);
1618
+ Poll::Ready(Ok(()))
1619
+ }
1620
+
1621
+ /// Tries to receive data on the connected address without removing it from the input queue.
1622
+ /// On success, returns the number of bytes read.
1623
+ ///
1624
+ /// When there is no pending data, `Err(io::ErrorKind::WouldBlock)` is
1625
+ /// returned. This function is usually paired with `readable()`.
1626
+ ///
1627
+ /// # Notes
1628
+ ///
1629
+ /// On Windows, if the data is larger than the buffer specified, the buffer
1630
+ /// is filled with the first part of the data, and peek returns the error
1631
+ /// `WSAEMSGSIZE(10040)`. The excess data is lost.
1632
+ /// Make sure to always use a sufficiently large buffer to hold the
1633
+ /// maximum UDP packet size, which can be up to 65536 bytes in size.
1634
+ ///
1635
+ /// MacOS will return an error if you pass a zero-sized buffer.
1636
+ ///
1637
+ /// If you're merely interested in learning the sender of the data at the head of the queue,
1638
+ /// try [`try_peek_sender`].
1639
+ ///
1640
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1641
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1642
+ /// Because UDP is stateless and does not validate the origin of a packet,
1643
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1644
+ /// It is important to be aware of this when designing your application-level protocol.
1645
+ ///
1646
+ /// [`try_peek_sender`]: method@Self::try_peek_sender
1647
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1648
+ pub fn try_peek(&self, buf: &mut [u8]) -> io::Result<usize> {
1649
+ self.io
1650
+ .registration()
1651
+ .try_io(Interest::READABLE, || self.io.peek(buf))
1652
+ }
1653
+
1654
+ /// Receives data from the socket, without removing it from the input queue.
1655
+ /// On success, returns the number of bytes read and the address from whence
1656
+ /// the data came.
1657
+ ///
1658
+ /// # Notes
1659
+ ///
1660
+ /// On Windows, if the data is larger than the buffer specified, the buffer
1661
+ /// is filled with the first part of the data, and `peek_from` returns the error
1662
+ /// `WSAEMSGSIZE(10040)`. The excess data is lost.
1663
+ /// Make sure to always use a sufficiently large buffer to hold the
1664
+ /// maximum UDP packet size, which can be up to 65536 bytes in size.
1665
+ ///
1666
+ /// MacOS will return an error if you pass a zero-sized buffer.
1667
+ ///
1668
+ /// If you're merely interested in learning the sender of the data at the head of the queue,
1669
+ /// try [`peek_sender`].
1670
+ ///
1671
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1672
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1673
+ /// Because UDP is stateless and does not validate the origin of a packet,
1674
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1675
+ /// It is important to be aware of this when designing your application-level protocol.
1676
+ ///
1677
+ /// # Examples
1678
+ ///
1679
+ /// ```no_run
1680
+ /// use tokio::net::UdpSocket;
1681
+ /// use std::io;
1682
+ ///
1683
+ /// #[tokio::main]
1684
+ /// async fn main() -> io::Result<()> {
1685
+ /// let socket = UdpSocket::bind("127.0.0.1:8080").await?;
1686
+ ///
1687
+ /// let mut buf = vec![0u8; 32];
1688
+ /// let (len, addr) = socket.peek_from(&mut buf).await?;
1689
+ ///
1690
+ /// println!("peeked {:?} bytes from {:?}", len, addr);
1691
+ ///
1692
+ /// Ok(())
1693
+ /// }
1694
+ /// ```
1695
+ ///
1696
+ /// [`peek_sender`]: method@Self::peek_sender
1697
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1698
+ pub async fn peek_from(&self, buf: &mut [u8]) -> io::Result<(usize, SocketAddr)> {
1699
+ self.io
1700
+ .registration()
1701
+ .async_io(Interest::READABLE, || self.io.peek_from(buf))
1702
+ .await
1703
+ }
1704
+
1705
+ /// Receives data from the socket, without removing it from the input queue.
1706
+ /// On success, returns the sending address of the datagram.
1707
+ ///
1708
+ /// # Notes
1709
+ ///
1710
+ /// Note that on multiple calls to a `poll_*` method in the `recv` direction, only the
1711
+ /// `Waker` from the `Context` passed to the most recent call will be scheduled to
1712
+ /// receive a wakeup
1713
+ ///
1714
+ /// On Windows, if the data is larger than the buffer specified, the buffer
1715
+ /// is filled with the first part of the data, and peek returns the error
1716
+ /// `WSAEMSGSIZE(10040)`. The excess data is lost.
1717
+ /// Make sure to always use a sufficiently large buffer to hold the
1718
+ /// maximum UDP packet size, which can be up to 65536 bytes in size.
1719
+ ///
1720
+ /// MacOS will return an error if you pass a zero-sized buffer.
1721
+ ///
1722
+ /// If you're merely interested in learning the sender of the data at the head of the queue,
1723
+ /// try [`poll_peek_sender`].
1724
+ ///
1725
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1726
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1727
+ /// Because UDP is stateless and does not validate the origin of a packet,
1728
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1729
+ /// It is important to be aware of this when designing your application-level protocol.
1730
+ ///
1731
+ /// # Return value
1732
+ ///
1733
+ /// The function returns:
1734
+ ///
1735
+ /// * `Poll::Pending` if the socket is not ready to read
1736
+ /// * `Poll::Ready(Ok(addr))` reads data from `addr` into `ReadBuf` if the socket is ready
1737
+ /// * `Poll::Ready(Err(e))` if an error is encountered.
1738
+ ///
1739
+ /// # Errors
1740
+ ///
1741
+ /// This function may encounter any standard I/O error except `WouldBlock`.
1742
+ ///
1743
+ /// [`poll_peek_sender`]: method@Self::poll_peek_sender
1744
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1745
+ pub fn poll_peek_from(
1746
+ &self,
1747
+ cx: &mut Context<'_>,
1748
+ buf: &mut ReadBuf<'_>,
1749
+ ) -> Poll<io::Result<SocketAddr>> {
1750
+ #[allow(clippy::blocks_in_conditions)]
1751
+ let (n, addr) = ready!(self.io.registration().poll_read_io(cx, || {
1752
+ // Safety: will not read the maybe uninitialized bytes.
1753
+ let b = unsafe {
1754
+ &mut *(buf.unfilled_mut() as *mut [std::mem::MaybeUninit<u8>] as *mut [u8])
1755
+ };
1756
+
1757
+ self.io.peek_from(b)
1758
+ }))?;
1759
+
1760
+ // Safety: We trust `recv` to have filled up `n` bytes in the buffer.
1761
+ unsafe {
1762
+ buf.assume_init(n);
1763
+ }
1764
+ buf.advance(n);
1765
+ Poll::Ready(Ok(addr))
1766
+ }
1767
+
1768
+ /// Tries to receive data on the socket without removing it from the input queue.
1769
+ /// On success, returns the number of bytes read and the sending address of the
1770
+ /// datagram.
1771
+ ///
1772
+ /// When there is no pending data, `Err(io::ErrorKind::WouldBlock)` is
1773
+ /// returned. This function is usually paired with `readable()`.
1774
+ ///
1775
+ /// # Notes
1776
+ ///
1777
+ /// On Windows, if the data is larger than the buffer specified, the buffer
1778
+ /// is filled with the first part of the data, and peek returns the error
1779
+ /// `WSAEMSGSIZE(10040)`. The excess data is lost.
1780
+ /// Make sure to always use a sufficiently large buffer to hold the
1781
+ /// maximum UDP packet size, which can be up to 65536 bytes in size.
1782
+ ///
1783
+ /// MacOS will return an error if you pass a zero-sized buffer.
1784
+ ///
1785
+ /// If you're merely interested in learning the sender of the data at the head of the queue,
1786
+ /// try [`try_peek_sender`].
1787
+ ///
1788
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1789
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1790
+ /// Because UDP is stateless and does not validate the origin of a packet,
1791
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1792
+ /// It is important to be aware of this when designing your application-level protocol.
1793
+ ///
1794
+ /// [`try_peek_sender`]: method@Self::try_peek_sender
1795
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1796
+ pub fn try_peek_from(&self, buf: &mut [u8]) -> io::Result<(usize, SocketAddr)> {
1797
+ self.io
1798
+ .registration()
1799
+ .try_io(Interest::READABLE, || self.io.peek_from(buf))
1800
+ }
1801
+
1802
+ /// Retrieve the sender of the data at the head of the input queue, waiting if empty.
1803
+ ///
1804
+ /// This is equivalent to calling [`peek_from`] with a zero-sized buffer,
1805
+ /// but suppresses the `WSAEMSGSIZE` error on Windows and the "invalid argument" error on macOS.
1806
+ ///
1807
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1808
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1809
+ /// Because UDP is stateless and does not validate the origin of a packet,
1810
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1811
+ /// It is important to be aware of this when designing your application-level protocol.
1812
+ ///
1813
+ /// [`peek_from`]: method@Self::peek_from
1814
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1815
+ pub async fn peek_sender(&self) -> io::Result<SocketAddr> {
1816
+ self.io
1817
+ .registration()
1818
+ .async_io(Interest::READABLE, || self.peek_sender_inner())
1819
+ .await
1820
+ }
1821
+
1822
+ /// Retrieve the sender of the data at the head of the input queue,
1823
+ /// scheduling a wakeup if empty.
1824
+ ///
1825
+ /// This is equivalent to calling [`poll_peek_from`] with a zero-sized buffer,
1826
+ /// but suppresses the `WSAEMSGSIZE` error on Windows and the "invalid argument" error on macOS.
1827
+ ///
1828
+ /// # Notes
1829
+ ///
1830
+ /// Note that on multiple calls to a `poll_*` method in the `recv` direction, only the
1831
+ /// `Waker` from the `Context` passed to the most recent call will be scheduled to
1832
+ /// receive a wakeup.
1833
+ ///
1834
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1835
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1836
+ /// Because UDP is stateless and does not validate the origin of a packet,
1837
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1838
+ /// It is important to be aware of this when designing your application-level protocol.
1839
+ ///
1840
+ /// [`poll_peek_from`]: method@Self::poll_peek_from
1841
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1842
+ pub fn poll_peek_sender(&self, cx: &mut Context<'_>) -> Poll<io::Result<SocketAddr>> {
1843
+ self.io
1844
+ .registration()
1845
+ .poll_read_io(cx, || self.peek_sender_inner())
1846
+ }
1847
+
1848
+ /// Try to retrieve the sender of the data at the head of the input queue.
1849
+ ///
1850
+ /// When there is no pending data, `Err(io::ErrorKind::WouldBlock)` is
1851
+ /// returned. This function is usually paired with `readable()`.
1852
+ ///
1853
+ /// Note that the socket address **cannot** be implicitly trusted, because it is relatively
1854
+ /// trivial to send a UDP datagram with a spoofed origin in a [packet injection attack].
1855
+ /// Because UDP is stateless and does not validate the origin of a packet,
1856
+ /// the attacker does not need to be able to intercept traffic in order to interfere.
1857
+ /// It is important to be aware of this when designing your application-level protocol.
1858
+ ///
1859
+ /// [packet injection attack]: https://en.wikipedia.org/wiki/Packet_injection
1860
+ pub fn try_peek_sender(&self) -> io::Result<SocketAddr> {
1861
+ self.io
1862
+ .registration()
1863
+ .try_io(Interest::READABLE, || self.peek_sender_inner())
1864
+ }
1865
+
1866
+ #[inline]
1867
+ fn peek_sender_inner(&self) -> io::Result<SocketAddr> {
1868
+ self.io.try_io(|| {
1869
+ self.as_socket()
1870
+ .peek_sender()?
1871
+ // May be `None` if the platform doesn't populate the sender for some reason.
1872
+ // In testing, that only occurred on macOS if you pass a zero-sized buffer,
1873
+ // but the implementation of `Socket::peek_sender()` covers that.
1874
+ .as_socket()
1875
+ .ok_or_else(|| io::Error::new(io::ErrorKind::Other, "sender not available"))
1876
+ })
1877
+ }
1878
+
1879
+ /// Gets the value of the `SO_BROADCAST` option for this socket.
1880
+ ///
1881
+ /// For more information about this option, see [`set_broadcast`].
1882
+ ///
1883
+ /// [`set_broadcast`]: method@Self::set_broadcast
1884
+ pub fn broadcast(&self) -> io::Result<bool> {
1885
+ self.io.broadcast()
1886
+ }
1887
+
1888
+ /// Sets the value of the `SO_BROADCAST` option for this socket.
1889
+ ///
1890
+ /// When enabled, this socket is allowed to send packets to a broadcast
1891
+ /// address.
1892
+ pub fn set_broadcast(&self, on: bool) -> io::Result<()> {
1893
+ self.io.set_broadcast(on)
1894
+ }
1895
+
1896
+ /// Gets the value of the `IP_MULTICAST_LOOP` option for this socket.
1897
+ ///
1898
+ /// For more information about this option, see [`set_multicast_loop_v4`].
1899
+ ///
1900
+ /// [`set_multicast_loop_v4`]: method@Self::set_multicast_loop_v4
1901
+ pub fn multicast_loop_v4(&self) -> io::Result<bool> {
1902
+ self.io.multicast_loop_v4()
1903
+ }
1904
+
1905
+ /// Sets the value of the `IP_MULTICAST_LOOP` option for this socket.
1906
+ ///
1907
+ /// If enabled, multicast packets will be looped back to the local socket.
1908
+ ///
1909
+ /// # Note
1910
+ ///
1911
+ /// This may not have any effect on IPv6 sockets.
1912
+ pub fn set_multicast_loop_v4(&self, on: bool) -> io::Result<()> {
1913
+ self.io.set_multicast_loop_v4(on)
1914
+ }
1915
+
1916
+ /// Gets the value of the `IP_MULTICAST_TTL` option for this socket.
1917
+ ///
1918
+ /// For more information about this option, see [`set_multicast_ttl_v4`].
1919
+ ///
1920
+ /// [`set_multicast_ttl_v4`]: method@Self::set_multicast_ttl_v4
1921
+ pub fn multicast_ttl_v4(&self) -> io::Result<u32> {
1922
+ self.io.multicast_ttl_v4()
1923
+ }
1924
+
1925
+ /// Sets the value of the `IP_MULTICAST_TTL` option for this socket.
1926
+ ///
1927
+ /// Indicates the time-to-live value of outgoing multicast packets for
1928
+ /// this socket. The default value is 1 which means that multicast packets
1929
+ /// don't leave the local network unless explicitly requested.
1930
+ ///
1931
+ /// # Note
1932
+ ///
1933
+ /// This may not have any effect on IPv6 sockets.
1934
+ pub fn set_multicast_ttl_v4(&self, ttl: u32) -> io::Result<()> {
1935
+ self.io.set_multicast_ttl_v4(ttl)
1936
+ }
1937
+
1938
+ /// Gets the value of the `IPV6_MULTICAST_LOOP` option for this socket.
1939
+ ///
1940
+ /// For more information about this option, see [`set_multicast_loop_v6`].
1941
+ ///
1942
+ /// [`set_multicast_loop_v6`]: method@Self::set_multicast_loop_v6
1943
+ pub fn multicast_loop_v6(&self) -> io::Result<bool> {
1944
+ self.io.multicast_loop_v6()
1945
+ }
1946
+
1947
+ /// Sets the value of the `IPV6_MULTICAST_LOOP` option for this socket.
1948
+ ///
1949
+ /// Controls whether this socket sees the multicast packets it sends itself.
1950
+ ///
1951
+ /// # Note
1952
+ ///
1953
+ /// This may not have any effect on IPv4 sockets.
1954
+ pub fn set_multicast_loop_v6(&self, on: bool) -> io::Result<()> {
1955
+ self.io.set_multicast_loop_v6(on)
1956
+ }
1957
+
1958
+ /// Gets the value of the `IPV6_TCLASS` option for this socket.
1959
+ ///
1960
+ /// For more information about this option, see [`set_tclass_v6`].
1961
+ ///
1962
+ /// [`set_tclass_v6`]: Self::set_tclass_v6
1963
+ // https://docs.rs/socket2/0.6.1/src/socket2/sys/unix.rs.html#2541
1964
+ #[cfg(any(
1965
+ target_os = "android",
1966
+ target_os = "dragonfly",
1967
+ target_os = "freebsd",
1968
+ target_os = "fuchsia",
1969
+ target_os = "linux",
1970
+ target_os = "macos",
1971
+ target_os = "netbsd",
1972
+ target_os = "openbsd",
1973
+ target_os = "cygwin",
1974
+ ))]
1975
+ #[cfg_attr(
1976
+ docsrs,
1977
+ doc(cfg(any(
1978
+ target_os = "android",
1979
+ target_os = "dragonfly",
1980
+ target_os = "freebsd",
1981
+ target_os = "fuchsia",
1982
+ target_os = "linux",
1983
+ target_os = "macos",
1984
+ target_os = "netbsd",
1985
+ target_os = "openbsd",
1986
+ target_os = "cygwin",
1987
+ )))
1988
+ )]
1989
+ pub fn tclass_v6(&self) -> io::Result<u32> {
1990
+ self.as_socket().tclass_v6()
1991
+ }
1992
+
1993
+ /// Sets the value for the `IPV6_TCLASS` option on this socket.
1994
+ ///
1995
+ /// Specifies the traffic class field that is used in every packet
1996
+ /// sent from this socket.
1997
+ ///
1998
+ /// # Note
1999
+ ///
2000
+ /// This may not have any effect on IPv4 sockets.
2001
+ // https://docs.rs/socket2/0.6.1/src/socket2/sys/unix.rs.html#2566
2002
+ #[cfg(any(
2003
+ target_os = "android",
2004
+ target_os = "dragonfly",
2005
+ target_os = "freebsd",
2006
+ target_os = "fuchsia",
2007
+ target_os = "linux",
2008
+ target_os = "macos",
2009
+ target_os = "netbsd",
2010
+ target_os = "openbsd",
2011
+ target_os = "cygwin",
2012
+ ))]
2013
+ #[cfg_attr(
2014
+ docsrs,
2015
+ doc(cfg(any(
2016
+ target_os = "android",
2017
+ target_os = "dragonfly",
2018
+ target_os = "freebsd",
2019
+ target_os = "fuchsia",
2020
+ target_os = "linux",
2021
+ target_os = "macos",
2022
+ target_os = "netbsd",
2023
+ target_os = "openbsd",
2024
+ target_os = "cygwin",
2025
+ )))
2026
+ )]
2027
+ pub fn set_tclass_v6(&self, tclass: u32) -> io::Result<()> {
2028
+ self.as_socket().set_tclass_v6(tclass)
2029
+ }
2030
+
2031
+ /// Gets the value of the `IP_TTL` option for this socket.
2032
+ ///
2033
+ /// For more information about this option, see [`set_ttl`].
2034
+ ///
2035
+ /// [`set_ttl`]: method@Self::set_ttl
2036
+ ///
2037
+ /// # Examples
2038
+ ///
2039
+ /// ```no_run
2040
+ /// use tokio::net::UdpSocket;
2041
+ /// # use std::io;
2042
+ ///
2043
+ /// # async fn dox() -> io::Result<()> {
2044
+ /// let sock = UdpSocket::bind("127.0.0.1:8080").await?;
2045
+ ///
2046
+ /// println!("{:?}", sock.ttl()?);
2047
+ /// # Ok(())
2048
+ /// # }
2049
+ /// ```
2050
+ pub fn ttl(&self) -> io::Result<u32> {
2051
+ self.io.ttl()
2052
+ }
2053
+
2054
+ /// Sets the value for the `IP_TTL` option on this socket.
2055
+ ///
2056
+ /// This value sets the time-to-live field that is used in every packet sent
2057
+ /// from this socket.
2058
+ ///
2059
+ /// # Examples
2060
+ ///
2061
+ /// ```no_run
2062
+ /// use tokio::net::UdpSocket;
2063
+ /// # use std::io;
2064
+ ///
2065
+ /// # async fn dox() -> io::Result<()> {
2066
+ /// let sock = UdpSocket::bind("127.0.0.1:8080").await?;
2067
+ /// sock.set_ttl(60)?;
2068
+ ///
2069
+ /// # Ok(())
2070
+ /// # }
2071
+ /// ```
2072
+ pub fn set_ttl(&self, ttl: u32) -> io::Result<()> {
2073
+ self.io.set_ttl(ttl)
2074
+ }
2075
+
2076
+ /// Gets the value of the `IP_TOS` option for this socket.
2077
+ ///
2078
+ /// For more information about this option, see [`set_tos_v4`].
2079
+ ///
2080
+ /// [`set_tos_v4`]: Self::set_tos_v4
2081
+ // https://docs.rs/socket2/0.6.1/src/socket2/socket.rs.html#1585
2082
+ #[cfg(not(any(
2083
+ target_os = "fuchsia",
2084
+ target_os = "redox",
2085
+ target_os = "solaris",
2086
+ target_os = "illumos",
2087
+ target_os = "haiku"
2088
+ )))]
2089
+ #[cfg_attr(
2090
+ docsrs,
2091
+ doc(cfg(not(any(
2092
+ target_os = "fuchsia",
2093
+ target_os = "redox",
2094
+ target_os = "solaris",
2095
+ target_os = "illumos",
2096
+ target_os = "haiku"
2097
+ ))))
2098
+ )]
2099
+ pub fn tos_v4(&self) -> io::Result<u32> {
2100
+ self.as_socket().tos_v4()
2101
+ }
2102
+
2103
+ /// Deprecated. Use [`tos_v4()`] instead.
2104
+ ///
2105
+ /// [`tos_v4()`]: Self::tos_v4
2106
+ #[deprecated(
2107
+ note = "`tos` related methods have been renamed `tos_v4` since they are IPv4-specific."
2108
+ )]
2109
+ #[doc(hidden)]
2110
+ #[cfg(not(any(
2111
+ target_os = "fuchsia",
2112
+ target_os = "redox",
2113
+ target_os = "solaris",
2114
+ target_os = "illumos",
2115
+ target_os = "haiku"
2116
+ )))]
2117
+ #[cfg_attr(
2118
+ docsrs,
2119
+ doc(cfg(not(any(
2120
+ target_os = "fuchsia",
2121
+ target_os = "redox",
2122
+ target_os = "solaris",
2123
+ target_os = "illumos",
2124
+ target_os = "haiku"
2125
+ ))))
2126
+ )]
2127
+ pub fn tos(&self) -> io::Result<u32> {
2128
+ self.tos_v4()
2129
+ }
2130
+
2131
+ /// Sets the value for the `IP_TOS` option on this socket.
2132
+ ///
2133
+ /// This value sets the type-of-service field that is used in every packet
2134
+ /// sent from this socket.
2135
+ ///
2136
+ /// # Note
2137
+ ///
2138
+ /// - This may not have any effect on IPv6 sockets.
2139
+ /// - On Windows, `IP_TOS` is only supported on [Windows 8+ or
2140
+ /// Windows Server 2012+.](https://docs.microsoft.com/en-us/windows/win32/winsock/ipproto-ip-socket-options)
2141
+ // https://docs.rs/socket2/0.6.1/src/socket2/socket.rs.html#1566
2142
+ #[cfg(not(any(
2143
+ target_os = "fuchsia",
2144
+ target_os = "redox",
2145
+ target_os = "solaris",
2146
+ target_os = "illumos",
2147
+ target_os = "haiku"
2148
+ )))]
2149
+ #[cfg_attr(
2150
+ docsrs,
2151
+ doc(cfg(not(any(
2152
+ target_os = "fuchsia",
2153
+ target_os = "redox",
2154
+ target_os = "solaris",
2155
+ target_os = "illumos",
2156
+ target_os = "haiku"
2157
+ ))))
2158
+ )]
2159
+ pub fn set_tos_v4(&self, tos: u32) -> io::Result<()> {
2160
+ self.as_socket().set_tos_v4(tos)
2161
+ }
2162
+
2163
+ /// Deprecated. Use [`set_tos_v4()`] instead.
2164
+ ///
2165
+ /// [`set_tos_v4()`]: Self::set_tos_v4
2166
+ #[deprecated(
2167
+ note = "`tos` related methods have been renamed `tos_v4` since they are IPv4-specific."
2168
+ )]
2169
+ #[doc(hidden)]
2170
+ #[cfg(not(any(
2171
+ target_os = "fuchsia",
2172
+ target_os = "redox",
2173
+ target_os = "solaris",
2174
+ target_os = "illumos",
2175
+ target_os = "haiku"
2176
+ )))]
2177
+ #[cfg_attr(
2178
+ docsrs,
2179
+ doc(cfg(not(any(
2180
+ target_os = "fuchsia",
2181
+ target_os = "redox",
2182
+ target_os = "solaris",
2183
+ target_os = "illumos",
2184
+ target_os = "haiku"
2185
+ ))))
2186
+ )]
2187
+ pub fn set_tos(&self, tos: u32) -> io::Result<()> {
2188
+ self.set_tos_v4(tos)
2189
+ }
2190
+
2191
+ /// Gets the value for the `SO_BINDTODEVICE` option on this socket
2192
+ ///
2193
+ /// This value gets the socket-bound device's interface name.
2194
+ #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux",))]
2195
+ #[cfg_attr(
2196
+ docsrs,
2197
+ doc(cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux",)))
2198
+ )]
2199
+ pub fn device(&self) -> io::Result<Option<Vec<u8>>> {
2200
+ self.as_socket().device()
2201
+ }
2202
+
2203
+ /// Sets the value for the `SO_BINDTODEVICE` option on this socket
2204
+ ///
2205
+ /// If a socket is bound to an interface, only packets received from that
2206
+ /// particular interface are processed by the socket. Note that this only
2207
+ /// works for some socket types, particularly `AF_INET` sockets.
2208
+ ///
2209
+ /// If `interface` is `None` or an empty string it removes the binding.
2210
+ #[cfg(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))]
2211
+ #[cfg_attr(
2212
+ docsrs,
2213
+ doc(cfg(all(any(target_os = "android", target_os = "fuchsia", target_os = "linux"))))
2214
+ )]
2215
+ pub fn bind_device(&self, interface: Option<&[u8]>) -> io::Result<()> {
2216
+ self.as_socket().bind_device(interface)
2217
+ }
2218
+
2219
+ /// Executes an operation of the `IP_ADD_MEMBERSHIP` type.
2220
+ ///
2221
+ /// This function specifies a new multicast group for this socket to join.
2222
+ /// The address must be a valid multicast address, and `interface` is the
2223
+ /// address of the local interface with which the system should join the
2224
+ /// multicast group. If it's equal to `INADDR_ANY` then an appropriate
2225
+ /// interface is chosen by the system.
2226
+ pub fn join_multicast_v4(&self, multiaddr: Ipv4Addr, interface: Ipv4Addr) -> io::Result<()> {
2227
+ self.io.join_multicast_v4(&multiaddr, &interface)
2228
+ }
2229
+
2230
+ /// Executes an operation of the `IPV6_ADD_MEMBERSHIP` type.
2231
+ ///
2232
+ /// This function specifies a new multicast group for this socket to join.
2233
+ /// The address must be a valid multicast address, and `interface` is the
2234
+ /// index of the interface to join/leave (or 0 to indicate any interface).
2235
+ pub fn join_multicast_v6(&self, multiaddr: &Ipv6Addr, interface: u32) -> io::Result<()> {
2236
+ self.io.join_multicast_v6(multiaddr, interface)
2237
+ }
2238
+
2239
+ /// Executes an operation of the `IP_DROP_MEMBERSHIP` type.
2240
+ ///
2241
+ /// For more information about this option, see [`join_multicast_v4`].
2242
+ ///
2243
+ /// [`join_multicast_v4`]: method@Self::join_multicast_v4
2244
+ pub fn leave_multicast_v4(&self, multiaddr: Ipv4Addr, interface: Ipv4Addr) -> io::Result<()> {
2245
+ self.io.leave_multicast_v4(&multiaddr, &interface)
2246
+ }
2247
+
2248
+ /// Executes an operation of the `IPV6_DROP_MEMBERSHIP` type.
2249
+ ///
2250
+ /// For more information about this option, see [`join_multicast_v6`].
2251
+ ///
2252
+ /// [`join_multicast_v6`]: method@Self::join_multicast_v6
2253
+ pub fn leave_multicast_v6(&self, multiaddr: &Ipv6Addr, interface: u32) -> io::Result<()> {
2254
+ self.io.leave_multicast_v6(multiaddr, interface)
2255
+ }
2256
+
2257
+ /// Returns the value of the `SO_ERROR` option.
2258
+ ///
2259
+ /// # Examples
2260
+ /// ```
2261
+ /// use tokio::net::UdpSocket;
2262
+ /// use std::io;
2263
+ ///
2264
+ /// #[tokio::main]
2265
+ /// async fn main() -> io::Result<()> {
2266
+ /// # if cfg!(miri) { return Ok(()); } // No `socket` in miri.
2267
+ /// // Create a socket
2268
+ /// let socket = UdpSocket::bind("0.0.0.0:8080").await?;
2269
+ ///
2270
+ /// if let Ok(Some(err)) = socket.take_error() {
2271
+ /// println!("Got error: {:?}", err);
2272
+ /// }
2273
+ ///
2274
+ /// Ok(())
2275
+ /// }
2276
+ /// ```
2277
+ pub fn take_error(&self) -> io::Result<Option<io::Error>> {
2278
+ self.io.take_error()
2279
+ }
2280
+ }
2281
+
2282
+ impl TryFrom<std::net::UdpSocket> for UdpSocket {
2283
+ type Error = io::Error;
2284
+
2285
+ /// Consumes stream, returning the tokio I/O object.
2286
+ ///
2287
+ /// This is equivalent to
2288
+ /// [`UdpSocket::from_std(stream)`](UdpSocket::from_std).
2289
+ fn try_from(stream: std::net::UdpSocket) -> Result<Self, Self::Error> {
2290
+ Self::from_std(stream)
2291
+ }
2292
+ }
2293
+
2294
+ impl fmt::Debug for UdpSocket {
2295
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
2296
+ self.io.fmt(f)
2297
+ }
2298
+ }
2299
+
2300
+ #[cfg(unix)]
2301
+ mod sys {
2302
+ use super::UdpSocket;
2303
+ use std::os::unix::prelude::*;
2304
+
2305
+ impl AsRawFd for UdpSocket {
2306
+ fn as_raw_fd(&self) -> RawFd {
2307
+ self.io.as_raw_fd()
2308
+ }
2309
+ }
2310
+
2311
+ impl AsFd for UdpSocket {
2312
+ fn as_fd(&self) -> BorrowedFd<'_> {
2313
+ unsafe { BorrowedFd::borrow_raw(self.as_raw_fd()) }
2314
+ }
2315
+ }
2316
+ }
2317
+
2318
+ cfg_windows! {
2319
+ use crate::os::windows::io::{AsRawSocket, RawSocket};
2320
+ use crate::os::windows::io::{AsSocket, BorrowedSocket};
2321
+
2322
+ impl AsRawSocket for UdpSocket {
2323
+ fn as_raw_socket(&self) -> RawSocket {
2324
+ self.io.as_raw_socket()
2325
+ }
2326
+ }
2327
+
2328
+ impl AsSocket for UdpSocket {
2329
+ fn as_socket(&self) -> BorrowedSocket<'_> {
2330
+ unsafe { BorrowedSocket::borrow_raw(self.as_raw_socket()) }
2331
+ }
2332
+ }
2333
+ }