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.
- checksums.yaml +4 -4
- data/Cargo.toml +3 -0
- data/Gemfile.lock +2 -2
- data/README.md +8 -5
- data/ext/html-to-markdown-rb/native/Cargo.toml +1 -1
- data/lib/html_to_markdown/version.rb +1 -1
- data/rust-vendor/anyhow/.cargo-checksum.json +1 -1
- data/rust-vendor/anyhow/.cargo_vcs_info.json +1 -1
- data/rust-vendor/anyhow/.github/workflows/ci.yml +3 -4
- data/rust-vendor/anyhow/Cargo.lock +31 -111
- data/rust-vendor/anyhow/Cargo.toml +2 -5
- data/rust-vendor/anyhow/Cargo.toml.orig +4 -8
- data/rust-vendor/anyhow/build.rs +1 -14
- data/rust-vendor/anyhow/src/backtrace.rs +8 -370
- data/rust-vendor/anyhow/src/error.rs +12 -39
- data/rust-vendor/anyhow/src/fmt.rs +2 -2
- data/rust-vendor/anyhow/src/lib.rs +1 -1
- data/rust-vendor/async-trait/.cargo-checksum.json +1 -0
- data/rust-vendor/async-trait/.cargo_vcs_info.json +6 -0
- data/rust-vendor/async-trait/.github/FUNDING.yml +1 -0
- data/rust-vendor/async-trait/.github/workflows/ci.yml +109 -0
- data/rust-vendor/async-trait/Cargo.lock +453 -0
- data/rust-vendor/async-trait/Cargo.toml +91 -0
- data/rust-vendor/async-trait/Cargo.toml.orig +38 -0
- data/rust-vendor/async-trait/LICENSE-APACHE +176 -0
- data/rust-vendor/async-trait/README.md +205 -0
- data/rust-vendor/async-trait/src/args.rs +36 -0
- data/rust-vendor/async-trait/src/bound.rs +50 -0
- data/rust-vendor/async-trait/src/expand.rs +504 -0
- data/rust-vendor/async-trait/src/lib.rs +257 -0
- data/rust-vendor/async-trait/src/lifetime.rs +112 -0
- data/rust-vendor/async-trait/src/parse.rs +34 -0
- data/rust-vendor/async-trait/src/receiver.rs +169 -0
- data/rust-vendor/async-trait/src/verbatim.rs +34 -0
- data/rust-vendor/async-trait/tests/compiletest.rs +7 -0
- data/rust-vendor/async-trait/tests/executor/mod.rs +36 -0
- data/rust-vendor/async-trait/tests/test.rs +1728 -0
- data/rust-vendor/async-trait/tests/ui/arg-implementation-detail.rs +22 -0
- data/rust-vendor/async-trait/tests/ui/arg-implementation-detail.stderr +5 -0
- data/rust-vendor/async-trait/tests/ui/bare-trait-object.rs +15 -0
- data/rust-vendor/async-trait/tests/ui/bare-trait-object.stderr +15 -0
- data/rust-vendor/async-trait/tests/ui/consider-restricting.rs +26 -0
- data/rust-vendor/async-trait/tests/ui/consider-restricting.stderr +33 -0
- data/rust-vendor/async-trait/tests/ui/delimiter-span.rs +24 -0
- data/rust-vendor/async-trait/tests/ui/delimiter-span.stderr +21 -0
- data/rust-vendor/async-trait/tests/ui/lifetime-defined-here.rs +23 -0
- data/rust-vendor/async-trait/tests/ui/lifetime-defined-here.stderr +29 -0
- data/rust-vendor/async-trait/tests/ui/lifetime-span.rs +36 -0
- data/rust-vendor/async-trait/tests/ui/lifetime-span.stderr +33 -0
- data/rust-vendor/async-trait/tests/ui/missing-async-in-impl.rs +15 -0
- data/rust-vendor/async-trait/tests/ui/missing-async-in-impl.stderr +8 -0
- data/rust-vendor/async-trait/tests/ui/missing-async-in-trait.rs +15 -0
- data/rust-vendor/async-trait/tests/ui/missing-async-in-trait.stderr +8 -0
- data/rust-vendor/async-trait/tests/ui/missing-body.rs +15 -0
- data/rust-vendor/async-trait/tests/ui/missing-body.stderr +7 -0
- data/rust-vendor/async-trait/tests/ui/must-use.rs +21 -0
- data/rust-vendor/async-trait/tests/ui/must-use.stderr +23 -0
- data/rust-vendor/async-trait/tests/ui/no-attribute-macro.rs +13 -0
- data/rust-vendor/async-trait/tests/ui/no-attribute-macro.stderr +17 -0
- data/rust-vendor/async-trait/tests/ui/self-span.rs +30 -0
- data/rust-vendor/async-trait/tests/ui/self-span.stderr +32 -0
- data/rust-vendor/async-trait/tests/ui/send-not-implemented.rs +22 -0
- data/rust-vendor/async-trait/tests/ui/send-not-implemented.stderr +31 -0
- data/rust-vendor/async-trait/tests/ui/type-mismatch.rs +21 -0
- data/rust-vendor/async-trait/tests/ui/type-mismatch.stderr +11 -0
- data/rust-vendor/async-trait/tests/ui/unreachable.rs +20 -0
- data/rust-vendor/async-trait/tests/ui/unreachable.stderr +14 -0
- data/rust-vendor/async-trait/tests/ui/unsupported-self.rs +15 -0
- data/rust-vendor/async-trait/tests/ui/unsupported-self.stderr +5 -0
- data/rust-vendor/bumpalo/.cargo-checksum.json +1 -1
- data/rust-vendor/bumpalo/.cargo_vcs_info.json +1 -1
- data/rust-vendor/bumpalo/CHANGELOG.md +39 -0
- data/rust-vendor/bumpalo/Cargo.lock +1 -1
- data/rust-vendor/bumpalo/Cargo.toml +2 -2
- data/rust-vendor/bumpalo/Cargo.toml.orig +2 -2
- data/rust-vendor/bumpalo/src/boxed.rs +73 -25
- data/rust-vendor/bumpalo/src/collections/string.rs +41 -19
- data/rust-vendor/bumpalo/src/collections/vec.rs +27 -0
- data/rust-vendor/bumpalo/src/lib.rs +11 -0
- data/rust-vendor/futures/.cargo-checksum.json +1 -0
- data/rust-vendor/futures/.cargo_vcs_info.json +6 -0
- data/rust-vendor/futures/Cargo.lock +746 -0
- data/rust-vendor/futures/Cargo.toml +394 -0
- data/rust-vendor/futures/Cargo.toml.orig +65 -0
- data/rust-vendor/futures/LICENSE-APACHE +202 -0
- data/rust-vendor/futures/LICENSE-MIT +26 -0
- data/rust-vendor/futures/README.md +61 -0
- data/rust-vendor/futures/src/lib.rs +254 -0
- data/rust-vendor/futures/tests/_require_features.rs +13 -0
- data/rust-vendor/futures/tests/async_await_macros.rs +404 -0
- data/rust-vendor/futures/tests/auto_traits.rs +1899 -0
- data/rust-vendor/futures/tests/bilock.rs +104 -0
- data/rust-vendor/futures/tests/compat.rs +16 -0
- data/rust-vendor/futures/tests/eager_drop.rs +121 -0
- data/rust-vendor/futures/tests/eventual.rs +179 -0
- data/rust-vendor/futures/tests/future_abortable.rs +44 -0
- data/rust-vendor/futures/tests/future_basic_combinators.rs +104 -0
- data/rust-vendor/futures/tests/future_fuse.rs +12 -0
- data/rust-vendor/futures/tests/future_inspect.rs +16 -0
- data/rust-vendor/futures/tests/future_join.rs +32 -0
- data/rust-vendor/futures/tests/future_join_all.rs +40 -0
- data/rust-vendor/futures/tests/future_obj.rs +33 -0
- data/rust-vendor/futures/tests/future_select_all.rs +25 -0
- data/rust-vendor/futures/tests/future_select_ok.rs +30 -0
- data/rust-vendor/futures/tests/future_shared.rs +273 -0
- data/rust-vendor/futures/tests/future_try_flatten_stream.rs +83 -0
- data/rust-vendor/futures/tests/future_try_join_all.rs +44 -0
- data/rust-vendor/futures/tests/io_buf_reader.rs +431 -0
- data/rust-vendor/futures/tests/io_buf_writer.rs +239 -0
- data/rust-vendor/futures/tests/io_cursor.rs +30 -0
- data/rust-vendor/futures/tests/io_line_writer.rs +73 -0
- data/rust-vendor/futures/tests/io_lines.rs +84 -0
- data/rust-vendor/futures/tests/io_read.rs +64 -0
- data/rust-vendor/futures/tests/io_read_exact.rs +17 -0
- data/rust-vendor/futures/tests/io_read_line.rs +101 -0
- data/rust-vendor/futures/tests/io_read_to_end.rs +65 -0
- data/rust-vendor/futures/tests/io_read_to_string.rs +44 -0
- data/rust-vendor/futures/tests/io_read_until.rs +60 -0
- data/rust-vendor/futures/tests/io_window.rs +30 -0
- data/rust-vendor/futures/tests/io_write.rs +65 -0
- data/rust-vendor/futures/tests/lock_mutex.rs +69 -0
- data/rust-vendor/futures/tests/macro_comma_support.rs +43 -0
- data/rust-vendor/futures/tests/object_safety.rs +49 -0
- data/rust-vendor/futures/tests/oneshot.rs +78 -0
- data/rust-vendor/futures/tests/ready_queue.rs +148 -0
- data/rust-vendor/futures/tests/recurse.rs +25 -0
- data/rust-vendor/futures/tests/sink.rs +554 -0
- data/rust-vendor/futures/tests/sink_fanout.rs +24 -0
- data/rust-vendor/futures/tests/stream.rs +577 -0
- data/rust-vendor/futures/tests/stream_abortable.rs +46 -0
- data/rust-vendor/futures/tests/stream_buffer_unordered.rs +73 -0
- data/rust-vendor/futures/tests/stream_catch_unwind.rs +27 -0
- data/rust-vendor/futures/tests/stream_futures_ordered.rs +172 -0
- data/rust-vendor/futures/tests/stream_futures_unordered.rs +431 -0
- data/rust-vendor/futures/tests/stream_into_async_read.rs +94 -0
- data/rust-vendor/futures/tests/stream_peekable.rs +58 -0
- data/rust-vendor/futures/tests/stream_select_all.rs +197 -0
- data/rust-vendor/futures/tests/stream_select_next_some.rs +86 -0
- data/rust-vendor/futures/tests/stream_split.rs +57 -0
- data/rust-vendor/futures/tests/stream_try_stream.rs +183 -0
- data/rust-vendor/futures/tests/stream_unfold.rs +32 -0
- data/rust-vendor/futures/tests/task_arc_wake.rs +79 -0
- data/rust-vendor/futures/tests/task_atomic_waker.rs +48 -0
- data/rust-vendor/futures/tests/test_macro.rs +20 -0
- data/rust-vendor/futures/tests/try_join.rs +35 -0
- data/rust-vendor/futures/tests_disabled/all.rs +400 -0
- data/rust-vendor/futures/tests_disabled/stream.rs +368 -0
- data/rust-vendor/futures-channel/.cargo-checksum.json +1 -0
- data/rust-vendor/futures-channel/.cargo_vcs_info.json +6 -0
- data/rust-vendor/futures-channel/Cargo.lock +23 -0
- data/rust-vendor/futures-channel/Cargo.toml +97 -0
- data/rust-vendor/futures-channel/Cargo.toml.orig +38 -0
- data/rust-vendor/futures-channel/LICENSE-APACHE +202 -0
- data/rust-vendor/futures-channel/LICENSE-MIT +26 -0
- data/rust-vendor/futures-channel/README.md +23 -0
- data/rust-vendor/futures-channel/benches/sync_mpsc.rs +135 -0
- data/rust-vendor/futures-channel/src/lib.rs +38 -0
- data/rust-vendor/futures-channel/src/lock.rs +102 -0
- data/rust-vendor/futures-channel/src/mpsc/mod.rs +1468 -0
- data/rust-vendor/futures-channel/src/mpsc/queue.rs +177 -0
- data/rust-vendor/futures-channel/src/mpsc/sink_impl.rs +73 -0
- data/rust-vendor/futures-channel/src/oneshot.rs +488 -0
- data/rust-vendor/futures-channel/tests/channel.rs +66 -0
- data/rust-vendor/futures-channel/tests/mpsc-close.rs +332 -0
- data/rust-vendor/futures-channel/tests/mpsc-size_hint.rs +40 -0
- data/rust-vendor/futures-channel/tests/mpsc.rs +703 -0
- data/rust-vendor/futures-channel/tests/oneshot.rs +256 -0
- data/rust-vendor/futures-core/.cargo-checksum.json +1 -0
- data/rust-vendor/futures-core/.cargo_vcs_info.json +6 -0
- data/rust-vendor/futures-core/Cargo.lock +16 -0
- data/rust-vendor/futures-core/Cargo.toml +66 -0
- data/rust-vendor/futures-core/Cargo.toml.orig +35 -0
- data/rust-vendor/futures-core/LICENSE-APACHE +202 -0
- data/rust-vendor/futures-core/LICENSE-MIT +26 -0
- data/rust-vendor/futures-core/README.md +23 -0
- data/rust-vendor/futures-core/src/future.rs +113 -0
- data/rust-vendor/futures-core/src/lib.rs +27 -0
- data/rust-vendor/futures-core/src/stream.rs +245 -0
- data/rust-vendor/futures-core/src/task/__internal/atomic_waker.rs +423 -0
- data/rust-vendor/futures-core/src/task/__internal/mod.rs +7 -0
- data/rust-vendor/futures-core/src/task/mod.rs +10 -0
- data/rust-vendor/futures-core/src/task/poll.rs +15 -0
- data/rust-vendor/futures-executor/.cargo-checksum.json +1 -0
- data/rust-vendor/futures-executor/.cargo_vcs_info.json +6 -0
- data/rust-vendor/futures-executor/Cargo.lock +48 -0
- data/rust-vendor/futures-executor/Cargo.toml +82 -0
- data/rust-vendor/futures-executor/Cargo.toml.orig +32 -0
- data/rust-vendor/futures-executor/LICENSE-APACHE +202 -0
- data/rust-vendor/futures-executor/LICENSE-MIT +26 -0
- data/rust-vendor/futures-executor/README.md +23 -0
- data/rust-vendor/futures-executor/benches/thread_notify.rs +109 -0
- data/rust-vendor/futures-executor/src/enter.rs +80 -0
- data/rust-vendor/futures-executor/src/lib.rs +73 -0
- data/rust-vendor/futures-executor/src/local_pool.rs +401 -0
- data/rust-vendor/futures-executor/src/thread_pool.rs +377 -0
- data/rust-vendor/futures-executor/src/unpark_mutex.rs +137 -0
- data/rust-vendor/futures-executor/tests/local_pool.rs +497 -0
- data/rust-vendor/futures-io/.cargo-checksum.json +1 -0
- data/rust-vendor/futures-io/.cargo_vcs_info.json +6 -0
- data/rust-vendor/futures-io/Cargo.lock +6 -0
- data/rust-vendor/futures-io/Cargo.toml +58 -0
- data/rust-vendor/futures-io/Cargo.toml.orig +30 -0
- data/rust-vendor/futures-io/LICENSE-APACHE +202 -0
- data/rust-vendor/futures-io/LICENSE-MIT +26 -0
- data/rust-vendor/futures-io/README.md +23 -0
- data/rust-vendor/futures-io/src/lib.rs +561 -0
- data/rust-vendor/futures-macro/.cargo-checksum.json +1 -0
- data/rust-vendor/futures-macro/.cargo_vcs_info.json +6 -0
- data/rust-vendor/futures-macro/Cargo.lock +47 -0
- data/rust-vendor/futures-macro/Cargo.toml +57 -0
- data/rust-vendor/futures-macro/Cargo.toml.orig +25 -0
- data/rust-vendor/futures-macro/LICENSE-APACHE +202 -0
- data/rust-vendor/futures-macro/LICENSE-MIT +26 -0
- data/rust-vendor/futures-macro/src/executor.rs +56 -0
- data/rust-vendor/futures-macro/src/join.rs +144 -0
- data/rust-vendor/futures-macro/src/lib.rs +55 -0
- data/rust-vendor/futures-macro/src/select.rs +330 -0
- data/rust-vendor/futures-macro/src/stream_select.rs +113 -0
- data/rust-vendor/futures-sink/.cargo-checksum.json +1 -0
- data/rust-vendor/futures-sink/.cargo_vcs_info.json +6 -0
- data/rust-vendor/futures-sink/Cargo.lock +6 -0
- data/rust-vendor/futures-sink/Cargo.toml +54 -0
- data/rust-vendor/futures-sink/Cargo.toml.orig +25 -0
- data/rust-vendor/futures-sink/LICENSE-APACHE +202 -0
- data/rust-vendor/futures-sink/LICENSE-MIT +26 -0
- data/rust-vendor/futures-sink/README.md +23 -0
- data/rust-vendor/futures-sink/src/lib.rs +240 -0
- data/rust-vendor/futures-task/.cargo-checksum.json +1 -0
- data/rust-vendor/futures-task/.cargo_vcs_info.json +6 -0
- data/rust-vendor/futures-task/Cargo.lock +6 -0
- data/rust-vendor/futures-task/Cargo.toml +58 -0
- data/rust-vendor/futures-task/Cargo.toml.orig +33 -0
- data/rust-vendor/futures-task/LICENSE-APACHE +202 -0
- data/rust-vendor/futures-task/LICENSE-MIT +26 -0
- data/rust-vendor/futures-task/README.md +23 -0
- data/rust-vendor/futures-task/src/arc_wake.rs +49 -0
- data/rust-vendor/futures-task/src/future_obj.rs +335 -0
- data/rust-vendor/futures-task/src/lib.rs +50 -0
- data/rust-vendor/futures-task/src/noop_waker.rs +63 -0
- data/rust-vendor/futures-task/src/spawn.rs +192 -0
- data/rust-vendor/futures-task/src/waker.rs +60 -0
- data/rust-vendor/futures-task/src/waker_ref.rs +66 -0
- data/rust-vendor/futures-util/.cargo-checksum.json +1 -0
- data/rust-vendor/futures-util/.cargo_vcs_info.json +6 -0
- data/rust-vendor/futures-util/Cargo.lock +693 -0
- data/rust-vendor/futures-util/Cargo.toml +181 -0
- data/rust-vendor/futures-util/Cargo.toml.orig +65 -0
- data/rust-vendor/futures-util/LICENSE-APACHE +202 -0
- data/rust-vendor/futures-util/LICENSE-MIT +26 -0
- data/rust-vendor/futures-util/README.md +23 -0
- data/rust-vendor/futures-util/benches/bilock.rs +68 -0
- data/rust-vendor/futures-util/benches/flatten_unordered.rs +58 -0
- data/rust-vendor/futures-util/benches/futures_unordered.rs +43 -0
- data/rust-vendor/futures-util/benches/select.rs +35 -0
- data/rust-vendor/futures-util/src/abortable.rs +209 -0
- data/rust-vendor/futures-util/src/async_await/join_mod.rs +110 -0
- data/rust-vendor/futures-util/src/async_await/mod.rs +60 -0
- data/rust-vendor/futures-util/src/async_await/pending.rs +43 -0
- data/rust-vendor/futures-util/src/async_await/poll.rs +39 -0
- data/rust-vendor/futures-util/src/async_await/random.rs +54 -0
- data/rust-vendor/futures-util/src/async_await/select_mod.rs +340 -0
- data/rust-vendor/futures-util/src/async_await/stream_select_mod.rs +39 -0
- data/rust-vendor/futures-util/src/compat/compat01as03.rs +455 -0
- data/rust-vendor/futures-util/src/compat/compat03as01.rs +268 -0
- data/rust-vendor/futures-util/src/compat/executor.rs +86 -0
- data/rust-vendor/futures-util/src/compat/mod.rs +22 -0
- data/rust-vendor/futures-util/src/fns.rs +372 -0
- data/rust-vendor/futures-util/src/future/abortable.rs +19 -0
- data/rust-vendor/futures-util/src/future/always_ready.rs +62 -0
- data/rust-vendor/futures-util/src/future/either.rs +314 -0
- data/rust-vendor/futures-util/src/future/future/catch_unwind.rs +39 -0
- data/rust-vendor/futures-util/src/future/future/flatten.rs +153 -0
- data/rust-vendor/futures-util/src/future/future/fuse.rs +92 -0
- data/rust-vendor/futures-util/src/future/future/map.rs +66 -0
- data/rust-vendor/futures-util/src/future/future/mod.rs +603 -0
- data/rust-vendor/futures-util/src/future/future/remote_handle.rs +127 -0
- data/rust-vendor/futures-util/src/future/future/shared.rs +430 -0
- data/rust-vendor/futures-util/src/future/join.rs +217 -0
- data/rust-vendor/futures-util/src/future/join_all.rs +167 -0
- data/rust-vendor/futures-util/src/future/lazy.rs +60 -0
- data/rust-vendor/futures-util/src/future/maybe_done.rs +105 -0
- data/rust-vendor/futures-util/src/future/mod.rs +134 -0
- data/rust-vendor/futures-util/src/future/option.rs +64 -0
- data/rust-vendor/futures-util/src/future/pending.rs +55 -0
- data/rust-vendor/futures-util/src/future/poll_fn.rs +58 -0
- data/rust-vendor/futures-util/src/future/poll_immediate.rs +131 -0
- data/rust-vendor/futures-util/src/future/ready.rs +82 -0
- data/rust-vendor/futures-util/src/future/select.rs +133 -0
- data/rust-vendor/futures-util/src/future/select_all.rs +75 -0
- data/rust-vendor/futures-util/src/future/select_ok.rs +85 -0
- data/rust-vendor/futures-util/src/future/try_future/into_future.rs +36 -0
- data/rust-vendor/futures-util/src/future/try_future/mod.rs +625 -0
- data/rust-vendor/futures-util/src/future/try_future/try_flatten.rs +162 -0
- data/rust-vendor/futures-util/src/future/try_future/try_flatten_err.rs +62 -0
- data/rust-vendor/futures-util/src/future/try_join.rs +256 -0
- data/rust-vendor/futures-util/src/future/try_join_all.rs +201 -0
- data/rust-vendor/futures-util/src/future/try_maybe_done.rs +92 -0
- data/rust-vendor/futures-util/src/future/try_select.rs +85 -0
- data/rust-vendor/futures-util/src/io/allow_std.rs +202 -0
- data/rust-vendor/futures-util/src/io/buf_reader.rs +264 -0
- data/rust-vendor/futures-util/src/io/buf_writer.rs +229 -0
- data/rust-vendor/futures-util/src/io/chain.rs +142 -0
- data/rust-vendor/futures-util/src/io/close.rs +28 -0
- data/rust-vendor/futures-util/src/io/copy.rs +58 -0
- data/rust-vendor/futures-util/src/io/copy_buf.rs +78 -0
- data/rust-vendor/futures-util/src/io/copy_buf_abortable.rs +124 -0
- data/rust-vendor/futures-util/src/io/cursor.rs +234 -0
- data/rust-vendor/futures-util/src/io/empty.rs +59 -0
- data/rust-vendor/futures-util/src/io/fill_buf.rs +47 -0
- data/rust-vendor/futures-util/src/io/flush.rs +31 -0
- data/rust-vendor/futures-util/src/io/into_sink.rs +82 -0
- data/rust-vendor/futures-util/src/io/line_writer.rs +155 -0
- data/rust-vendor/futures-util/src/io/lines.rs +50 -0
- data/rust-vendor/futures-util/src/io/mod.rs +833 -0
- data/rust-vendor/futures-util/src/io/read.rs +30 -0
- data/rust-vendor/futures-util/src/io/read_exact.rs +42 -0
- data/rust-vendor/futures-util/src/io/read_line.rs +77 -0
- data/rust-vendor/futures-util/src/io/read_to_end.rs +90 -0
- data/rust-vendor/futures-util/src/io/read_to_string.rs +60 -0
- data/rust-vendor/futures-util/src/io/read_until.rs +60 -0
- data/rust-vendor/futures-util/src/io/read_vectored.rs +30 -0
- data/rust-vendor/futures-util/src/io/repeat.rs +66 -0
- data/rust-vendor/futures-util/src/io/seek.rs +30 -0
- data/rust-vendor/futures-util/src/io/sink.rs +67 -0
- data/rust-vendor/futures-util/src/io/split.rs +129 -0
- data/rust-vendor/futures-util/src/io/take.rs +125 -0
- data/rust-vendor/futures-util/src/io/window.rs +104 -0
- data/rust-vendor/futures-util/src/io/write.rs +30 -0
- data/rust-vendor/futures-util/src/io/write_all.rs +43 -0
- data/rust-vendor/futures-util/src/io/write_all_vectored.rs +195 -0
- data/rust-vendor/futures-util/src/io/write_vectored.rs +30 -0
- data/rust-vendor/futures-util/src/lib.rs +332 -0
- data/rust-vendor/futures-util/src/lock/bilock.rs +297 -0
- data/rust-vendor/futures-util/src/lock/mod.rs +27 -0
- data/rust-vendor/futures-util/src/lock/mutex.rs +560 -0
- data/rust-vendor/futures-util/src/macros.rs +31 -0
- data/rust-vendor/futures-util/src/never.rs +18 -0
- data/rust-vendor/futures-util/src/sink/buffer.rs +105 -0
- data/rust-vendor/futures-util/src/sink/close.rs +32 -0
- data/rust-vendor/futures-util/src/sink/drain.rs +59 -0
- data/rust-vendor/futures-util/src/sink/err_into.rs +57 -0
- data/rust-vendor/futures-util/src/sink/fanout.rs +111 -0
- data/rust-vendor/futures-util/src/sink/feed.rs +43 -0
- data/rust-vendor/futures-util/src/sink/flush.rs +36 -0
- data/rust-vendor/futures-util/src/sink/map_err.rs +65 -0
- data/rust-vendor/futures-util/src/sink/mod.rs +344 -0
- data/rust-vendor/futures-util/src/sink/send.rs +41 -0
- data/rust-vendor/futures-util/src/sink/send_all.rs +100 -0
- data/rust-vendor/futures-util/src/sink/unfold.rs +92 -0
- data/rust-vendor/futures-util/src/sink/with.rs +145 -0
- data/rust-vendor/futures-util/src/sink/with_flat_map.rs +127 -0
- data/rust-vendor/futures-util/src/stream/abortable.rs +19 -0
- data/rust-vendor/futures-util/src/stream/empty.rs +45 -0
- data/rust-vendor/futures-util/src/stream/futures_ordered.rs +260 -0
- data/rust-vendor/futures-util/src/stream/futures_unordered/abort.rs +12 -0
- data/rust-vendor/futures-util/src/stream/futures_unordered/iter.rs +172 -0
- data/rust-vendor/futures-util/src/stream/futures_unordered/mod.rs +674 -0
- data/rust-vendor/futures-util/src/stream/futures_unordered/ready_to_run_queue.rs +113 -0
- data/rust-vendor/futures-util/src/stream/futures_unordered/task.rs +214 -0
- data/rust-vendor/futures-util/src/stream/iter.rs +66 -0
- data/rust-vendor/futures-util/src/stream/mod.rs +148 -0
- data/rust-vendor/futures-util/src/stream/once.rs +67 -0
- data/rust-vendor/futures-util/src/stream/pending.rs +45 -0
- data/rust-vendor/futures-util/src/stream/poll_fn.rs +57 -0
- data/rust-vendor/futures-util/src/stream/poll_immediate.rs +80 -0
- data/rust-vendor/futures-util/src/stream/repeat.rs +58 -0
- data/rust-vendor/futures-util/src/stream/repeat_with.rs +93 -0
- data/rust-vendor/futures-util/src/stream/select.rs +117 -0
- data/rust-vendor/futures-util/src/stream/select_all.rs +249 -0
- data/rust-vendor/futures-util/src/stream/select_with_strategy.rs +304 -0
- data/rust-vendor/futures-util/src/stream/stream/all.rs +93 -0
- data/rust-vendor/futures-util/src/stream/stream/any.rs +93 -0
- data/rust-vendor/futures-util/src/stream/stream/buffer_unordered.rs +120 -0
- data/rust-vendor/futures-util/src/stream/stream/buffered.rs +118 -0
- data/rust-vendor/futures-util/src/stream/stream/catch_unwind.rs +62 -0
- data/rust-vendor/futures-util/src/stream/stream/chain.rs +76 -0
- data/rust-vendor/futures-util/src/stream/stream/chunks.rs +103 -0
- data/rust-vendor/futures-util/src/stream/stream/collect.rs +56 -0
- data/rust-vendor/futures-util/src/stream/stream/concat.rs +62 -0
- data/rust-vendor/futures-util/src/stream/stream/count.rs +53 -0
- data/rust-vendor/futures-util/src/stream/stream/cycle.rs +67 -0
- data/rust-vendor/futures-util/src/stream/stream/enumerate.rs +64 -0
- data/rust-vendor/futures-util/src/stream/stream/filter.rs +117 -0
- data/rust-vendor/futures-util/src/stream/stream/filter_map.rs +111 -0
- data/rust-vendor/futures-util/src/stream/stream/flatten.rs +73 -0
- data/rust-vendor/futures-util/src/stream/stream/flatten_unordered.rs +531 -0
- data/rust-vendor/futures-util/src/stream/stream/fold.rs +88 -0
- data/rust-vendor/futures-util/src/stream/stream/for_each.rs +78 -0
- data/rust-vendor/futures-util/src/stream/stream/for_each_concurrent.rs +119 -0
- data/rust-vendor/futures-util/src/stream/stream/forward.rs +75 -0
- data/rust-vendor/futures-util/src/stream/stream/fuse.rs +75 -0
- data/rust-vendor/futures-util/src/stream/stream/into_future.rs +90 -0
- data/rust-vendor/futures-util/src/stream/stream/map.rs +77 -0
- data/rust-vendor/futures-util/src/stream/stream/mod.rs +1697 -0
- data/rust-vendor/futures-util/src/stream/stream/next.rs +34 -0
- data/rust-vendor/futures-util/src/stream/stream/peek.rs +441 -0
- data/rust-vendor/futures-util/src/stream/stream/ready_chunks.rs +93 -0
- data/rust-vendor/futures-util/src/stream/stream/scan.rs +128 -0
- data/rust-vendor/futures-util/src/stream/stream/select_next_some.rs +42 -0
- data/rust-vendor/futures-util/src/stream/stream/skip.rs +70 -0
- data/rust-vendor/futures-util/src/stream/stream/skip_while.rs +124 -0
- data/rust-vendor/futures-util/src/stream/stream/split.rs +224 -0
- data/rust-vendor/futures-util/src/stream/stream/take.rs +86 -0
- data/rust-vendor/futures-util/src/stream/stream/take_until.rs +170 -0
- data/rust-vendor/futures-util/src/stream/stream/take_while.rs +124 -0
- data/rust-vendor/futures-util/src/stream/stream/then.rs +101 -0
- data/rust-vendor/futures-util/src/stream/stream/unzip.rs +63 -0
- data/rust-vendor/futures-util/src/stream/stream/zip.rs +128 -0
- data/rust-vendor/futures-util/src/stream/try_stream/and_then.rs +105 -0
- data/rust-vendor/futures-util/src/stream/try_stream/into_async_read.rs +166 -0
- data/rust-vendor/futures-util/src/stream/try_stream/into_stream.rs +52 -0
- data/rust-vendor/futures-util/src/stream/try_stream/mod.rs +1254 -0
- data/rust-vendor/futures-util/src/stream/try_stream/or_else.rs +109 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_all.rs +98 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_any.rs +98 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_buffer_unordered.rs +86 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_buffered.rs +87 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_chunks.rs +132 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_collect.rs +52 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_concat.rs +51 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_filter.rs +112 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_filter_map.rs +106 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_flatten.rs +84 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_flatten_unordered.rs +176 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_fold.rs +93 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_for_each.rs +68 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_for_each_concurrent.rs +132 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_next.rs +34 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_ready_chunks.rs +126 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_skip_while.rs +120 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_take_while.rs +129 -0
- data/rust-vendor/futures-util/src/stream/try_stream/try_unfold.rs +122 -0
- data/rust-vendor/futures-util/src/stream/unfold.rs +119 -0
- data/rust-vendor/futures-util/src/task/mod.rs +40 -0
- data/rust-vendor/futures-util/src/task/spawn.rs +169 -0
- data/rust-vendor/futures-util/src/unfold_state.rs +39 -0
- data/rust-vendor/html-to-markdown-rs/Cargo.toml +2 -2
- data/rust-vendor/html-to-markdown-rs/src/convert_api.rs +5 -1
- data/rust-vendor/html-to-markdown-rs/src/converter/block/paragraph.rs +1 -0
- data/rust-vendor/html-to-markdown-rs/src/converter/context.rs +5 -0
- data/rust-vendor/html-to-markdown-rs/src/converter/text_node.rs +6 -1
- data/rust-vendor/html-to-markdown-rs/src/converter/visitor_hooks.rs +9 -3
- data/rust-vendor/html-to-markdown-rs/tests/convert_with_metadata_no_frontmatter.rs +100 -0
- data/rust-vendor/html-to-markdown-rs/tests/issue_212_regressions.rs +63 -0
- data/rust-vendor/html-to-markdown-rs/tests/visitor_integration_test.rs +58 -0
- data/rust-vendor/html5ever/.cargo-checksum.json +1 -1
- data/rust-vendor/html5ever/.cargo_vcs_info.json +1 -1
- data/rust-vendor/html5ever/Cargo.lock +216 -128
- data/rust-vendor/html5ever/Cargo.toml +11 -6
- data/rust-vendor/html5ever/Cargo.toml.orig +1 -0
- data/rust-vendor/html5ever/examples/arena.rs +30 -1
- data/rust-vendor/html5ever/src/driver.rs +19 -5
- data/rust-vendor/html5ever/src/encoding.rs +173 -0
- data/rust-vendor/html5ever/src/lib.rs +1 -0
- data/rust-vendor/html5ever/src/serialize/mod.rs +2 -2
- data/rust-vendor/html5ever/src/tokenizer/interface.rs +42 -4
- data/rust-vendor/html5ever/src/tokenizer/mod.rs +24 -1
- data/rust-vendor/html5ever/src/tokenizer/states.rs +34 -0
- data/rust-vendor/html5ever/src/tree_builder/mod.rs +8 -13
- data/rust-vendor/html5ever/src/tree_builder/rules.rs +131 -153
- data/rust-vendor/html5ever/src/tree_builder/tag_sets.rs +1 -6
- data/rust-vendor/html5ever/src/tree_builder/types.rs +22 -2
- data/rust-vendor/html5ever/tests/driver.rs +111 -0
- data/rust-vendor/js-sys/.cargo-checksum.json +1 -1
- data/rust-vendor/js-sys/.cargo_vcs_info.json +1 -1
- data/rust-vendor/js-sys/Cargo.lock +19 -19
- data/rust-vendor/js-sys/Cargo.toml +7 -3
- data/rust-vendor/js-sys/Cargo.toml.orig +7 -3
- data/rust-vendor/js-sys/README.md +2 -2
- data/rust-vendor/js-sys/src/Temporal.rs +2990 -663
- data/rust-vendor/js-sys/src/lib.rs +7485 -731
- data/rust-vendor/linux-raw-sys/.cargo-checksum.json +1 -1
- data/rust-vendor/linux-raw-sys/.cargo_vcs_info.json +1 -1
- data/rust-vendor/linux-raw-sys/Cargo.lock +3 -3
- data/rust-vendor/linux-raw-sys/Cargo.toml +3 -1
- data/rust-vendor/linux-raw-sys/Cargo.toml.orig +3 -1
- data/rust-vendor/linux-raw-sys/src/aarch64/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/aarch64/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/aarch64/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/aarch64/if_tun.rs +319 -0
- data/rust-vendor/linux-raw-sys/src/aarch64/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/aarch64/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/aarch64/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/aarch64/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/aarch64/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/aarch64/ptrace.rs +2 -0
- data/rust-vendor/linux-raw-sys/src/aarch64/vm_sockets.rs +111 -0
- data/rust-vendor/linux-raw-sys/src/aarch64/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/arm/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/arm/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/arm/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/arm/if_tun.rs +317 -0
- data/rust-vendor/linux-raw-sys/src/arm/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/arm/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/arm/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/arm/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/arm/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/arm/vm_sockets.rs +108 -0
- data/rust-vendor/linux-raw-sys/src/arm/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/csky/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/csky/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/csky/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/csky/if_tun.rs +317 -0
- data/rust-vendor/linux-raw-sys/src/csky/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/csky/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/csky/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/csky/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/csky/vm_sockets.rs +108 -0
- data/rust-vendor/linux-raw-sys/src/csky/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/auxvec.rs +30 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/bootparam.rs +3 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/btrfs.rs +1935 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/elf_uapi.rs +652 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/errno.rs +135 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/general.rs +3284 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/if_arp.rs +2793 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/if_ether.rs +168 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/if_packet.rs +309 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/if_tun.rs +317 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/image.rs +3 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/io_uring.rs +1489 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/ioctl.rs +3 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/landlock.rs +102 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/loop_device.rs +132 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/mempolicy.rs +175 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/net.rs +3487 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/netlink.rs +5606 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/prctl.rs +270 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/ptrace.rs +1091 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/system.rs +100 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/vm_sockets.rs +108 -0
- data/rust-vendor/linux-raw-sys/src/hexagon/xdp.rs +192 -0
- data/rust-vendor/linux-raw-sys/src/lib.rs +329 -0
- data/rust-vendor/linux-raw-sys/src/loongarch64/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/loongarch64/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/loongarch64/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/loongarch64/if_tun.rs +319 -0
- data/rust-vendor/linux-raw-sys/src/loongarch64/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/loongarch64/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/loongarch64/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/loongarch64/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/loongarch64/vm_sockets.rs +111 -0
- data/rust-vendor/linux-raw-sys/src/loongarch64/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/m68k/auxvec.rs +30 -0
- data/rust-vendor/linux-raw-sys/src/m68k/bootparam.rs +3 -0
- data/rust-vendor/linux-raw-sys/src/m68k/btrfs.rs +1935 -0
- data/rust-vendor/linux-raw-sys/src/m68k/elf_uapi.rs +652 -0
- data/rust-vendor/linux-raw-sys/src/m68k/errno.rs +135 -0
- data/rust-vendor/linux-raw-sys/src/m68k/general.rs +3379 -0
- data/rust-vendor/linux-raw-sys/src/m68k/if_arp.rs +2793 -0
- data/rust-vendor/linux-raw-sys/src/m68k/if_ether.rs +168 -0
- data/rust-vendor/linux-raw-sys/src/m68k/if_packet.rs +309 -0
- data/rust-vendor/linux-raw-sys/src/m68k/if_tun.rs +317 -0
- data/rust-vendor/linux-raw-sys/src/m68k/image.rs +3 -0
- data/rust-vendor/linux-raw-sys/src/m68k/io_uring.rs +1489 -0
- data/rust-vendor/linux-raw-sys/src/m68k/ioctl.rs +1501 -0
- data/rust-vendor/linux-raw-sys/src/m68k/landlock.rs +102 -0
- data/rust-vendor/linux-raw-sys/src/m68k/loop_device.rs +132 -0
- data/rust-vendor/linux-raw-sys/src/m68k/mempolicy.rs +175 -0
- data/rust-vendor/linux-raw-sys/src/m68k/net.rs +3487 -0
- data/rust-vendor/linux-raw-sys/src/m68k/netlink.rs +5606 -0
- data/rust-vendor/linux-raw-sys/src/m68k/prctl.rs +270 -0
- data/rust-vendor/linux-raw-sys/src/m68k/ptrace.rs +1019 -0
- data/rust-vendor/linux-raw-sys/src/m68k/system.rs +100 -0
- data/rust-vendor/linux-raw-sys/src/m68k/vm_sockets.rs +108 -0
- data/rust-vendor/linux-raw-sys/src/m68k/xdp.rs +192 -0
- data/rust-vendor/linux-raw-sys/src/mips/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/mips/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/mips/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/mips/if_tun.rs +327 -0
- data/rust-vendor/linux-raw-sys/src/mips/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/mips/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/mips/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/mips/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/mips/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/mips/vm_sockets.rs +118 -0
- data/rust-vendor/linux-raw-sys/src/mips/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/mips32r6/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/mips32r6/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/mips32r6/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/mips32r6/if_tun.rs +327 -0
- data/rust-vendor/linux-raw-sys/src/mips32r6/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/mips32r6/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/mips32r6/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/mips32r6/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/mips32r6/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/mips32r6/vm_sockets.rs +118 -0
- data/rust-vendor/linux-raw-sys/src/mips32r6/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/mips64/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/mips64/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/mips64/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/mips64/if_tun.rs +329 -0
- data/rust-vendor/linux-raw-sys/src/mips64/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/mips64/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/mips64/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/mips64/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/mips64/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/mips64/vm_sockets.rs +121 -0
- data/rust-vendor/linux-raw-sys/src/mips64/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/mips64r6/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/mips64r6/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/mips64r6/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/mips64r6/if_tun.rs +329 -0
- data/rust-vendor/linux-raw-sys/src/mips64r6/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/mips64r6/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/mips64r6/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/mips64r6/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/mips64r6/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/mips64r6/vm_sockets.rs +121 -0
- data/rust-vendor/linux-raw-sys/src/mips64r6/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/powerpc/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/powerpc/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/powerpc/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/powerpc/if_tun.rs +323 -0
- data/rust-vendor/linux-raw-sys/src/powerpc/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/powerpc/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/powerpc/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/powerpc/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/powerpc/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/powerpc/vm_sockets.rs +114 -0
- data/rust-vendor/linux-raw-sys/src/powerpc/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/powerpc64/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/powerpc64/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/powerpc64/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/powerpc64/if_tun.rs +325 -0
- data/rust-vendor/linux-raw-sys/src/powerpc64/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/powerpc64/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/powerpc64/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/powerpc64/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/powerpc64/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/powerpc64/vm_sockets.rs +117 -0
- data/rust-vendor/linux-raw-sys/src/powerpc64/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/riscv32/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/riscv32/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/riscv32/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/riscv32/if_tun.rs +317 -0
- data/rust-vendor/linux-raw-sys/src/riscv32/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/riscv32/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/riscv32/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/riscv32/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/riscv32/vm_sockets.rs +108 -0
- data/rust-vendor/linux-raw-sys/src/riscv32/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/riscv64/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/riscv64/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/riscv64/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/riscv64/if_tun.rs +319 -0
- data/rust-vendor/linux-raw-sys/src/riscv64/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/riscv64/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/riscv64/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/riscv64/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/riscv64/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/riscv64/vm_sockets.rs +111 -0
- data/rust-vendor/linux-raw-sys/src/riscv64/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/s390x/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/s390x/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/s390x/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/s390x/if_tun.rs +339 -0
- data/rust-vendor/linux-raw-sys/src/s390x/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/s390x/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/s390x/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/s390x/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/s390x/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/s390x/vm_sockets.rs +131 -0
- data/rust-vendor/linux-raw-sys/src/s390x/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/sparc/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/sparc/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/sparc/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/sparc/if_tun.rs +317 -0
- data/rust-vendor/linux-raw-sys/src/sparc/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/sparc/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/sparc/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/sparc/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/sparc/vm_sockets.rs +108 -0
- data/rust-vendor/linux-raw-sys/src/sparc/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/sparc64/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/sparc64/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/sparc64/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/sparc64/if_tun.rs +325 -0
- data/rust-vendor/linux-raw-sys/src/sparc64/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/sparc64/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/sparc64/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/sparc64/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/sparc64/vm_sockets.rs +117 -0
- data/rust-vendor/linux-raw-sys/src/sparc64/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/x32/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/x32/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/x32/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/x32/if_tun.rs +319 -0
- data/rust-vendor/linux-raw-sys/src/x32/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/x32/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/x32/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/x32/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/x32/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/x32/vm_sockets.rs +111 -0
- data/rust-vendor/linux-raw-sys/src/x32/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/x86/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/x86/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/x86/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/x86/if_tun.rs +317 -0
- data/rust-vendor/linux-raw-sys/src/x86/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/x86/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/x86/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/x86/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/x86/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/x86/vm_sockets.rs +108 -0
- data/rust-vendor/linux-raw-sys/src/x86/xdp.rs +1 -0
- data/rust-vendor/linux-raw-sys/src/x86_64/btrfs.rs +42 -1
- data/rust-vendor/linux-raw-sys/src/x86_64/general.rs +52 -2
- data/rust-vendor/linux-raw-sys/src/x86_64/if_arp.rs +6 -2
- data/rust-vendor/linux-raw-sys/src/x86_64/if_tun.rs +319 -0
- data/rust-vendor/linux-raw-sys/src/x86_64/io_uring.rs +52 -1
- data/rust-vendor/linux-raw-sys/src/x86_64/ioctl.rs +0 -1
- data/rust-vendor/linux-raw-sys/src/x86_64/net.rs +5 -1
- data/rust-vendor/linux-raw-sys/src/x86_64/netlink.rs +153 -6
- data/rust-vendor/linux-raw-sys/src/x86_64/prctl.rs +3 -2
- data/rust-vendor/linux-raw-sys/src/x86_64/vm_sockets.rs +111 -0
- data/rust-vendor/linux-raw-sys/src/x86_64/xdp.rs +1 -0
- data/rust-vendor/markup5ever/.cargo-checksum.json +1 -1
- data/rust-vendor/markup5ever/.cargo_vcs_info.json +1 -1
- data/rust-vendor/markup5ever/Cargo.toml +6 -3
- data/rust-vendor/markup5ever/Cargo.toml.orig +3 -0
- data/rust-vendor/markup5ever/interface/mod.rs +9 -0
- data/rust-vendor/markup5ever/interface/tree_builder.rs +11 -0
- data/rust-vendor/pin-project-lite/.cargo-checksum.json +1 -0
- data/rust-vendor/pin-project-lite/.cargo_vcs_info.json +6 -0
- data/rust-vendor/pin-project-lite/CHANGELOG.md +264 -0
- data/rust-vendor/pin-project-lite/Cargo.lock +23 -0
- data/rust-vendor/pin-project-lite/Cargo.toml +198 -0
- data/rust-vendor/pin-project-lite/Cargo.toml.orig +91 -0
- data/rust-vendor/pin-project-lite/LICENSE-APACHE +177 -0
- data/rust-vendor/pin-project-lite/LICENSE-MIT +23 -0
- data/rust-vendor/pin-project-lite/README.md +129 -0
- data/rust-vendor/pin-project-lite/src/lib.rs +1770 -0
- data/rust-vendor/pin-project-lite/tests/auxiliary/mod.rs +14 -0
- data/rust-vendor/pin-project-lite/tests/compiletest.rs +11 -0
- data/rust-vendor/pin-project-lite/tests/drop_order.rs +169 -0
- data/rust-vendor/pin-project-lite/tests/expand/.rustfmt.toml +1 -0
- data/rust-vendor/pin-project-lite/tests/expand/default/enum.expanded.rs +166 -0
- data/rust-vendor/pin-project-lite/tests/expand/default/enum.rs +19 -0
- data/rust-vendor/pin-project-lite/tests/expand/default/struct.expanded.rs +107 -0
- data/rust-vendor/pin-project-lite/tests/expand/default/struct.rs +13 -0
- data/rust-vendor/pin-project-lite/tests/expand/multifields/enum.expanded.rs +102 -0
- data/rust-vendor/pin-project-lite/tests/expand/multifields/enum.rs +20 -0
- data/rust-vendor/pin-project-lite/tests/expand/multifields/struct.expanded.rs +174 -0
- data/rust-vendor/pin-project-lite/tests/expand/multifields/struct.rs +17 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/enum-all.expanded.rs +166 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/enum-all.rs +19 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/enum-mut.expanded.rs +76 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/enum-mut.rs +17 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/enum-none.expanded.rs +33 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/enum-none.rs +16 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/enum-ref.expanded.rs +76 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/enum-ref.rs +17 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/struct-all.expanded.rs +151 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/struct-all.rs +16 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/struct-mut.expanded.rs +107 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/struct-mut.rs +14 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/struct-none.expanded.rs +107 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/struct-none.rs +13 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/struct-ref.expanded.rs +107 -0
- data/rust-vendor/pin-project-lite/tests/expand/naming/struct-ref.rs +14 -0
- data/rust-vendor/pin-project-lite/tests/expand/not_unpin/enum.expanded.rs +114 -0
- data/rust-vendor/pin-project-lite/tests/expand/not_unpin/enum.rs +19 -0
- data/rust-vendor/pin-project-lite/tests/expand/not_unpin/struct.expanded.rs +103 -0
- data/rust-vendor/pin-project-lite/tests/expand/not_unpin/struct.rs +16 -0
- data/rust-vendor/pin-project-lite/tests/expand/pinned_drop/enum.expanded.rs +128 -0
- data/rust-vendor/pin-project-lite/tests/expand/pinned_drop/enum.rs +23 -0
- data/rust-vendor/pin-project-lite/tests/expand/pinned_drop/struct.expanded.rs +117 -0
- data/rust-vendor/pin-project-lite/tests/expand/pinned_drop/struct.rs +18 -0
- data/rust-vendor/pin-project-lite/tests/expand/pub/enum.expanded.rs +118 -0
- data/rust-vendor/pin-project-lite/tests/expand/pub/enum.rs +18 -0
- data/rust-vendor/pin-project-lite/tests/expand/pub/struct.expanded.rs +107 -0
- data/rust-vendor/pin-project-lite/tests/expand/pub/struct.rs +13 -0
- data/rust-vendor/pin-project-lite/tests/expandtest.rs +10 -0
- data/rust-vendor/pin-project-lite/tests/include/basic.rs +81 -0
- data/rust-vendor/pin-project-lite/tests/proper_unpin.rs +101 -0
- data/rust-vendor/pin-project-lite/tests/test.rs +699 -0
- data/rust-vendor/pin-project-lite/tests/ui/not_unpin/conflict-unpin.rs +38 -0
- data/rust-vendor/pin-project-lite/tests/ui/not_unpin/conflict-unpin.stderr +50 -0
- data/rust-vendor/pin-project-lite/tests/ui/not_unpin/negative_impls_stable.rs +22 -0
- data/rust-vendor/pin-project-lite/tests/ui/not_unpin/negative_impls_stable.stderr +16 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/conflict-drop.rs +17 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/conflict-drop.stderr +15 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.rs +66 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/conflict-unpin.stderr +81 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs +95 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.stderr +512 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/invalid.rs +27 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/invalid.stderr +47 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/negative_impls_stable.rs +21 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/negative_impls_stable.stderr +15 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.rs +12 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/overlapping_lifetime_names.stderr +75 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.rs +22 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/overlapping_unpin_struct.stderr +34 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/packed.rs +21 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/packed.stderr +95 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/unpin_sneaky.rs +14 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/unpin_sneaky.stderr +5 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/unsupported.rs +29 -0
- data/rust-vendor/pin-project-lite/tests/ui/pin_project/unsupported.stderr +111 -0
- data/rust-vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.rs +19 -0
- data/rust-vendor/pin-project-lite/tests/ui/pinned_drop/call-drop-inner.stderr +22 -0
- data/rust-vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.rs +28 -0
- data/rust-vendor/pin-project-lite/tests/ui/pinned_drop/conditional-drop-impl.stderr +34 -0
- data/rust-vendor/regex-syntax/.cargo-checksum.json +1 -1
- data/rust-vendor/regex-syntax/.cargo_vcs_info.json +1 -1
- data/rust-vendor/regex-syntax/Cargo.lock +1 -1
- data/rust-vendor/regex-syntax/Cargo.toml +6 -1
- data/rust-vendor/regex-syntax/Cargo.toml.orig +1 -1
- data/rust-vendor/regex-syntax/benches/bench.rs +63 -0
- data/rust-vendor/regex-syntax/src/hir/translate.rs +6 -2
- data/rust-vendor/rgb/.cargo-checksum.json +1 -1
- data/rust-vendor/rgb/.cargo_vcs_info.json +1 -1
- data/rust-vendor/rgb/Cargo.lock +31 -20
- data/rust-vendor/rgb/Cargo.toml +1 -1
- data/rust-vendor/rgb/Cargo.toml.orig +1 -1
- data/rust-vendor/rgb/examples/example.rs +1 -12
- data/rust-vendor/rgb/src/as_bytes.rs +0 -21
- data/rust-vendor/rgb/src/formats/gray.rs +3 -2
- data/rust-vendor/rgb/src/legacy/alt.rs +7 -51
- data/rust-vendor/rgb/src/legacy/internal/convert/array.rs +0 -16
- data/rust-vendor/rgb/src/legacy/internal/convert/mod.rs +24 -74
- data/rust-vendor/rgb/src/legacy/internal/convert/tuple.rs +0 -9
- data/rust-vendor/rgb/src/legacy/internal/ops.rs +0 -156
- data/rust-vendor/rgb/src/legacy/internal/pixel.rs +8 -2
- data/rust-vendor/rgb/src/legacy/internal/rgb.rs +8 -61
- data/rust-vendor/rgb/src/legacy/internal/rgba.rs +8 -92
- data/rust-vendor/rgb/src/lib.rs +6 -113
- data/rust-vendor/rustix/.cargo-checksum.json +1 -1
- data/rust-vendor/rustix/.cargo_vcs_info.json +1 -1
- data/rust-vendor/rustix/Cargo.lock +301 -91
- data/rust-vendor/rustix/Cargo.toml +5 -5
- data/rust-vendor/rustix/Cargo.toml.orig +5 -5
- data/rust-vendor/rustix/README.md +4 -5
- data/rust-vendor/rustix/src/backend/libc/fs/makedev.rs +2 -22
- data/rust-vendor/rustix/src/backend/libc/fs/syscalls.rs +20 -2
- data/rust-vendor/rustix/src/backend/libc/fs/types.rs +16 -0
- data/rust-vendor/rustix/src/backend/linux_raw/arch/riscv64.rs +432 -13
- data/rust-vendor/rustix/src/fs/at.rs +30 -14
- data/rust-vendor/rustix/src/fs/mod.rs +2 -4
- data/rust-vendor/rustix/src/process/types.rs +23 -8
- data/rust-vendor/slab/.cargo-checksum.json +1 -0
- data/rust-vendor/slab/.cargo_vcs_info.json +6 -0
- data/rust-vendor/slab/CHANGELOG.md +71 -0
- data/rust-vendor/slab/Cargo.lock +83 -0
- data/rust-vendor/slab/Cargo.toml +67 -0
- data/rust-vendor/slab/Cargo.toml.orig +29 -0
- data/rust-vendor/slab/LICENSE +25 -0
- data/rust-vendor/slab/README.md +51 -0
- data/rust-vendor/slab/SECURITY.md +9 -0
- data/rust-vendor/slab/src/builder.rs +63 -0
- data/rust-vendor/slab/src/lib.rs +1653 -0
- data/rust-vendor/slab/src/serde.rs +62 -0
- data/rust-vendor/slab/tests/serde.rs +49 -0
- data/rust-vendor/slab/tests/slab.rs +782 -0
- data/rust-vendor/syn/.cargo-checksum.json +1 -1
- data/rust-vendor/syn/.cargo_vcs_info.json +1 -1
- data/rust-vendor/syn/Cargo.lock +30 -30
- data/rust-vendor/syn/Cargo.toml +1 -1
- data/rust-vendor/syn/Cargo.toml.orig +1 -1
- data/rust-vendor/syn/src/item.rs +3 -0
- data/rust-vendor/syn/src/lib.rs +1 -1
- data/rust-vendor/syn/tests/common/eq.rs +1 -1
- data/rust-vendor/tempfile/.cargo-checksum.json +1 -1
- data/rust-vendor/tempfile/.cargo_vcs_info.json +1 -1
- data/rust-vendor/tempfile/CHANGELOG.md +4 -0
- data/rust-vendor/tempfile/Cargo.lock +7 -7
- data/rust-vendor/tempfile/Cargo.toml +2 -2
- data/rust-vendor/tempfile/Cargo.toml.orig +2 -2
- data/rust-vendor/tempfile/README.md +23 -6
- data/rust-vendor/tempfile/src/env.rs +1 -1
- data/rust-vendor/tempfile/src/file/imp/unix.rs +2 -10
- data/rust-vendor/tempfile/src/lib.rs +1 -1
- data/rust-vendor/tempfile/src/util.rs +1 -1
- data/rust-vendor/tendril/.cargo-checksum.json +1 -1
- data/rust-vendor/tendril/.cargo_vcs_info.json +2 -2
- data/rust-vendor/tendril/Cargo.lock +642 -68
- data/rust-vendor/tendril/Cargo.toml +44 -16
- data/rust-vendor/tendril/Cargo.toml.orig +26 -15
- data/rust-vendor/tendril/README.md +27 -27
- data/rust-vendor/tendril/benches/futf.rs +63 -0
- data/rust-vendor/tendril/benches/tendril.rs +158 -0
- data/rust-vendor/tendril/examples/fuzz.rs +22 -25
- data/rust-vendor/tendril/src/buf32.rs +4 -9
- data/rust-vendor/tendril/src/fmt.rs +23 -26
- data/rust-vendor/tendril/src/futf.rs +504 -0
- data/rust-vendor/tendril/src/lib.rs +13 -13
- data/rust-vendor/tendril/src/stream.rs +46 -140
- data/rust-vendor/tendril/src/tendril.rs +56 -175
- data/rust-vendor/tendril/src/utf8_decode.rs +12 -14
- data/rust-vendor/tendril/src/util.rs +5 -9
- data/rust-vendor/tokio/.cargo-checksum.json +1 -0
- data/rust-vendor/tokio/.cargo_vcs_info.json +6 -0
- data/rust-vendor/tokio/CHANGELOG.md +4253 -0
- data/rust-vendor/tokio/Cargo.toml +934 -0
- data/rust-vendor/tokio/Cargo.toml.orig +189 -0
- data/rust-vendor/tokio/LICENSE +21 -0
- data/rust-vendor/tokio/README.md +255 -0
- data/rust-vendor/tokio/docs/reactor-refactor.md +276 -0
- data/rust-vendor/tokio/src/blocking.rs +63 -0
- data/rust-vendor/tokio/src/doc/mod.rs +47 -0
- data/rust-vendor/tokio/src/doc/os.rs +68 -0
- data/rust-vendor/tokio/src/fs/canonicalize.rs +49 -0
- data/rust-vendor/tokio/src/fs/copy.rs +24 -0
- data/rust-vendor/tokio/src/fs/create_dir.rs +50 -0
- data/rust-vendor/tokio/src/fs/create_dir_all.rs +51 -0
- data/rust-vendor/tokio/src/fs/dir_builder.rs +129 -0
- data/rust-vendor/tokio/src/fs/file/tests.rs +978 -0
- data/rust-vendor/tokio/src/fs/file.rs +995 -0
- data/rust-vendor/tokio/src/fs/hard_link.rs +44 -0
- data/rust-vendor/tokio/src/fs/metadata.rs +46 -0
- data/rust-vendor/tokio/src/fs/mocks.rs +176 -0
- data/rust-vendor/tokio/src/fs/mod.rs +324 -0
- data/rust-vendor/tokio/src/fs/open_options/mock_open_options.rs +39 -0
- data/rust-vendor/tokio/src/fs/open_options/uring_open_options.rs +128 -0
- data/rust-vendor/tokio/src/fs/open_options.rs +853 -0
- data/rust-vendor/tokio/src/fs/read.rs +77 -0
- data/rust-vendor/tokio/src/fs/read_dir.rs +357 -0
- data/rust-vendor/tokio/src/fs/read_link.rs +12 -0
- data/rust-vendor/tokio/src/fs/read_to_string.rs +30 -0
- data/rust-vendor/tokio/src/fs/read_uring.rs +134 -0
- data/rust-vendor/tokio/src/fs/remove_dir.rs +12 -0
- data/rust-vendor/tokio/src/fs/remove_dir_all.rs +14 -0
- data/rust-vendor/tokio/src/fs/remove_file.rs +16 -0
- data/rust-vendor/tokio/src/fs/rename.rs +17 -0
- data/rust-vendor/tokio/src/fs/set_permissions.rs +15 -0
- data/rust-vendor/tokio/src/fs/symlink.rs +16 -0
- data/rust-vendor/tokio/src/fs/symlink_dir.rs +19 -0
- data/rust-vendor/tokio/src/fs/symlink_file.rs +19 -0
- data/rust-vendor/tokio/src/fs/symlink_metadata.rs +15 -0
- data/rust-vendor/tokio/src/fs/try_exists.rs +28 -0
- data/rust-vendor/tokio/src/fs/write.rs +96 -0
- data/rust-vendor/tokio/src/future/block_on.rs +22 -0
- data/rust-vendor/tokio/src/future/maybe_done.rs +123 -0
- data/rust-vendor/tokio/src/future/mod.rs +28 -0
- data/rust-vendor/tokio/src/future/trace.rs +11 -0
- data/rust-vendor/tokio/src/future/try_join.rs +82 -0
- data/rust-vendor/tokio/src/fuzz.rs +1 -0
- data/rust-vendor/tokio/src/io/async_buf_read.rs +117 -0
- data/rust-vendor/tokio/src/io/async_fd.rs +1439 -0
- data/rust-vendor/tokio/src/io/async_read.rs +133 -0
- data/rust-vendor/tokio/src/io/async_seek.rs +96 -0
- data/rust-vendor/tokio/src/io/async_write.rs +403 -0
- data/rust-vendor/tokio/src/io/blocking.rs +306 -0
- data/rust-vendor/tokio/src/io/bsd/poll_aio.rs +197 -0
- data/rust-vendor/tokio/src/io/interest.rs +345 -0
- data/rust-vendor/tokio/src/io/join.rs +130 -0
- data/rust-vendor/tokio/src/io/mod.rs +308 -0
- data/rust-vendor/tokio/src/io/poll_evented.rs +297 -0
- data/rust-vendor/tokio/src/io/read_buf.rs +344 -0
- data/rust-vendor/tokio/src/io/ready.rs +322 -0
- data/rust-vendor/tokio/src/io/seek.rs +57 -0
- data/rust-vendor/tokio/src/io/split.rs +166 -0
- data/rust-vendor/tokio/src/io/stderr.rs +134 -0
- data/rust-vendor/tokio/src/io/stdin.rs +98 -0
- data/rust-vendor/tokio/src/io/stdio_common.rs +222 -0
- data/rust-vendor/tokio/src/io/stdout.rs +183 -0
- data/rust-vendor/tokio/src/io/uring/mod.rs +4 -0
- data/rust-vendor/tokio/src/io/uring/open.rs +59 -0
- data/rust-vendor/tokio/src/io/uring/read.rs +61 -0
- data/rust-vendor/tokio/src/io/uring/utils.rs +6 -0
- data/rust-vendor/tokio/src/io/uring/write.rs +55 -0
- data/rust-vendor/tokio/src/io/util/async_buf_read_ext.rs +357 -0
- data/rust-vendor/tokio/src/io/util/async_read_ext.rs +1454 -0
- data/rust-vendor/tokio/src/io/util/async_seek_ext.rs +96 -0
- data/rust-vendor/tokio/src/io/util/async_write_ext.rs +1332 -0
- data/rust-vendor/tokio/src/io/util/buf_reader.rs +311 -0
- data/rust-vendor/tokio/src/io/util/buf_stream.rs +207 -0
- data/rust-vendor/tokio/src/io/util/buf_writer.rs +310 -0
- data/rust-vendor/tokio/src/io/util/chain.rs +144 -0
- data/rust-vendor/tokio/src/io/util/copy.rs +303 -0
- data/rust-vendor/tokio/src/io/util/copy_bidirectional.rs +137 -0
- data/rust-vendor/tokio/src/io/util/copy_buf.rs +117 -0
- data/rust-vendor/tokio/src/io/util/empty.rs +164 -0
- data/rust-vendor/tokio/src/io/util/fill_buf.rs +59 -0
- data/rust-vendor/tokio/src/io/util/flush.rs +47 -0
- data/rust-vendor/tokio/src/io/util/lines.rs +145 -0
- data/rust-vendor/tokio/src/io/util/mem.rs +429 -0
- data/rust-vendor/tokio/src/io/util/mod.rs +112 -0
- data/rust-vendor/tokio/src/io/util/read.rs +55 -0
- data/rust-vendor/tokio/src/io/util/read_buf.rs +71 -0
- data/rust-vendor/tokio/src/io/util/read_exact.rs +69 -0
- data/rust-vendor/tokio/src/io/util/read_int.rs +158 -0
- data/rust-vendor/tokio/src/io/util/read_line.rs +119 -0
- data/rust-vendor/tokio/src/io/util/read_to_end.rs +143 -0
- data/rust-vendor/tokio/src/io/util/read_to_string.rs +78 -0
- data/rust-vendor/tokio/src/io/util/read_until.rs +80 -0
- data/rust-vendor/tokio/src/io/util/repeat.rs +74 -0
- data/rust-vendor/tokio/src/io/util/shutdown.rs +46 -0
- data/rust-vendor/tokio/src/io/util/sink.rs +94 -0
- data/rust-vendor/tokio/src/io/util/split.rs +121 -0
- data/rust-vendor/tokio/src/io/util/take.rs +138 -0
- data/rust-vendor/tokio/src/io/util/vec_with_initialized.rs +142 -0
- data/rust-vendor/tokio/src/io/util/write.rs +46 -0
- data/rust-vendor/tokio/src/io/util/write_all.rs +55 -0
- data/rust-vendor/tokio/src/io/util/write_all_buf.rs +64 -0
- data/rust-vendor/tokio/src/io/util/write_buf.rs +55 -0
- data/rust-vendor/tokio/src/io/util/write_int.rs +151 -0
- data/rust-vendor/tokio/src/io/util/write_vectored.rs +47 -0
- data/rust-vendor/tokio/src/lib.rs +707 -0
- data/rust-vendor/tokio/src/loom/mocked.rs +85 -0
- data/rust-vendor/tokio/src/loom/mod.rs +14 -0
- data/rust-vendor/tokio/src/loom/std/atomic_u16.rs +47 -0
- data/rust-vendor/tokio/src/loom/std/atomic_u32.rs +47 -0
- data/rust-vendor/tokio/src/loom/std/atomic_u64.rs +19 -0
- data/rust-vendor/tokio/src/loom/std/atomic_u64_as_mutex.rs +76 -0
- data/rust-vendor/tokio/src/loom/std/atomic_u64_native.rs +4 -0
- data/rust-vendor/tokio/src/loom/std/atomic_u64_static_const_new.rs +12 -0
- data/rust-vendor/tokio/src/loom/std/atomic_u64_static_once_cell.rs +57 -0
- data/rust-vendor/tokio/src/loom/std/atomic_usize.rs +59 -0
- data/rust-vendor/tokio/src/loom/std/barrier.rs +223 -0
- data/rust-vendor/tokio/src/loom/std/mod.rs +124 -0
- data/rust-vendor/tokio/src/loom/std/mutex.rs +36 -0
- data/rust-vendor/tokio/src/loom/std/parking_lot.rs +195 -0
- data/rust-vendor/tokio/src/loom/std/rwlock.rs +48 -0
- data/rust-vendor/tokio/src/loom/std/unsafe_cell.rs +18 -0
- data/rust-vendor/tokio/src/macros/addr_of.rs +27 -0
- data/rust-vendor/tokio/src/macros/cfg.rs +713 -0
- data/rust-vendor/tokio/src/macros/join.rs +279 -0
- data/rust-vendor/tokio/src/macros/loom.rs +8 -0
- data/rust-vendor/tokio/src/macros/mod.rs +36 -0
- data/rust-vendor/tokio/src/macros/pin.rs +144 -0
- data/rust-vendor/tokio/src/macros/select.rs +1411 -0
- data/rust-vendor/tokio/src/macros/support.rs +32 -0
- data/rust-vendor/tokio/src/macros/thread_local.rs +18 -0
- data/rust-vendor/tokio/src/macros/trace.rs +26 -0
- data/rust-vendor/tokio/src/macros/try_join.rs +280 -0
- data/rust-vendor/tokio/src/net/addr.rs +333 -0
- data/rust-vendor/tokio/src/net/lookup_host.rs +38 -0
- data/rust-vendor/tokio/src/net/mod.rs +64 -0
- data/rust-vendor/tokio/src/net/tcp/listener.rs +460 -0
- data/rust-vendor/tokio/src/net/tcp/mod.rs +16 -0
- data/rust-vendor/tokio/src/net/tcp/socket.rs +1027 -0
- data/rust-vendor/tokio/src/net/tcp/split.rs +423 -0
- data/rust-vendor/tokio/src/net/tcp/split_owned.rs +507 -0
- data/rust-vendor/tokio/src/net/tcp/stream.rs +1541 -0
- data/rust-vendor/tokio/src/net/udp.rs +2333 -0
- data/rust-vendor/tokio/src/net/unix/datagram/mod.rs +3 -0
- data/rust-vendor/tokio/src/net/unix/datagram/socket.rs +1621 -0
- data/rust-vendor/tokio/src/net/unix/listener.rs +247 -0
- data/rust-vendor/tokio/src/net/unix/mod.rs +39 -0
- data/rust-vendor/tokio/src/net/unix/pipe.rs +1442 -0
- data/rust-vendor/tokio/src/net/unix/socket.rs +273 -0
- data/rust-vendor/tokio/src/net/unix/socketaddr.rs +66 -0
- data/rust-vendor/tokio/src/net/unix/split.rs +331 -0
- data/rust-vendor/tokio/src/net/unix/split_owned.rs +419 -0
- data/rust-vendor/tokio/src/net/unix/stream.rs +1095 -0
- data/rust-vendor/tokio/src/net/unix/ucred.rs +332 -0
- data/rust-vendor/tokio/src/net/windows/mod.rs +3 -0
- data/rust-vendor/tokio/src/net/windows/named_pipe.rs +2699 -0
- data/rust-vendor/tokio/src/process/kill.rs +13 -0
- data/rust-vendor/tokio/src/process/mod.rs +1854 -0
- data/rust-vendor/tokio/src/process/unix/mod.rs +374 -0
- data/rust-vendor/tokio/src/process/unix/orphan.rs +334 -0
- data/rust-vendor/tokio/src/process/unix/pidfd_reaper.rs +352 -0
- data/rust-vendor/tokio/src/process/unix/reap.rs +298 -0
- data/rust-vendor/tokio/src/process/windows.rs +285 -0
- data/rust-vendor/tokio/src/runtime/blocking/mod.rs +26 -0
- data/rust-vendor/tokio/src/runtime/blocking/pool.rs +606 -0
- data/rust-vendor/tokio/src/runtime/blocking/schedule.rs +66 -0
- data/rust-vendor/tokio/src/runtime/blocking/shutdown.rs +71 -0
- data/rust-vendor/tokio/src/runtime/blocking/task.rs +44 -0
- data/rust-vendor/tokio/src/runtime/builder.rs +1840 -0
- data/rust-vendor/tokio/src/runtime/config.rs +54 -0
- data/rust-vendor/tokio/src/runtime/context/blocking.rs +121 -0
- data/rust-vendor/tokio/src/runtime/context/current.rs +97 -0
- data/rust-vendor/tokio/src/runtime/context/runtime.rs +99 -0
- data/rust-vendor/tokio/src/runtime/context/runtime_mt.rs +36 -0
- data/rust-vendor/tokio/src/runtime/context/scoped.rs +56 -0
- data/rust-vendor/tokio/src/runtime/context.rs +200 -0
- data/rust-vendor/tokio/src/runtime/driver/op.rs +207 -0
- data/rust-vendor/tokio/src/runtime/driver.rs +376 -0
- data/rust-vendor/tokio/src/runtime/dump.rs +340 -0
- data/rust-vendor/tokio/src/runtime/handle.rs +710 -0
- data/rust-vendor/tokio/src/runtime/id.rs +42 -0
- data/rust-vendor/tokio/src/runtime/io/driver/signal.rs +22 -0
- data/rust-vendor/tokio/src/runtime/io/driver/uring.rs +294 -0
- data/rust-vendor/tokio/src/runtime/io/driver.rs +333 -0
- data/rust-vendor/tokio/src/runtime/io/metrics.rs +24 -0
- data/rust-vendor/tokio/src/runtime/io/mod.rs +22 -0
- data/rust-vendor/tokio/src/runtime/io/registration.rs +259 -0
- data/rust-vendor/tokio/src/runtime/io/registration_set.rs +149 -0
- data/rust-vendor/tokio/src/runtime/io/scheduled_io.rs +582 -0
- data/rust-vendor/tokio/src/runtime/local_runtime/mod.rs +7 -0
- data/rust-vendor/tokio/src/runtime/local_runtime/options.rs +18 -0
- data/rust-vendor/tokio/src/runtime/local_runtime/runtime.rs +397 -0
- data/rust-vendor/tokio/src/runtime/metrics/batch.rs +303 -0
- data/rust-vendor/tokio/src/runtime/metrics/histogram/h2_histogram.rs +526 -0
- data/rust-vendor/tokio/src/runtime/metrics/histogram.rs +629 -0
- data/rust-vendor/tokio/src/runtime/metrics/io.rs +25 -0
- data/rust-vendor/tokio/src/runtime/metrics/mock.rs +15 -0
- data/rust-vendor/tokio/src/runtime/metrics/mod.rs +40 -0
- data/rust-vendor/tokio/src/runtime/metrics/runtime.rs +1122 -0
- data/rust-vendor/tokio/src/runtime/metrics/scheduler.rs +35 -0
- data/rust-vendor/tokio/src/runtime/metrics/worker.rs +110 -0
- data/rust-vendor/tokio/src/runtime/mod.rs +604 -0
- data/rust-vendor/tokio/src/runtime/park.rs +362 -0
- data/rust-vendor/tokio/src/runtime/process.rs +44 -0
- data/rust-vendor/tokio/src/runtime/runtime.rs +515 -0
- data/rust-vendor/tokio/src/runtime/scheduler/block_in_place.rs +9 -0
- data/rust-vendor/tokio/src/runtime/scheduler/current_thread/mod.rs +861 -0
- data/rust-vendor/tokio/src/runtime/scheduler/defer.rs +43 -0
- data/rust-vendor/tokio/src/runtime/scheduler/inject/metrics.rs +7 -0
- data/rust-vendor/tokio/src/runtime/scheduler/inject/pop.rs +55 -0
- data/rust-vendor/tokio/src/runtime/scheduler/inject/rt_multi_thread.rs +122 -0
- data/rust-vendor/tokio/src/runtime/scheduler/inject/shared.rs +121 -0
- data/rust-vendor/tokio/src/runtime/scheduler/inject/synced.rs +37 -0
- data/rust-vendor/tokio/src/runtime/scheduler/inject.rs +70 -0
- data/rust-vendor/tokio/src/runtime/scheduler/lock.rs +6 -0
- data/rust-vendor/tokio/src/runtime/scheduler/mod.rs +338 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/counters.rs +62 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/handle/metrics.rs +55 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/handle/taskdump.rs +26 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/handle.rs +132 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/idle.rs +240 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/mod.rs +105 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/overflow.rs +26 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/park.rs +300 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/queue.rs +599 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/stats.rs +137 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/trace.rs +61 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/trace_mock.rs +11 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker/metrics.rs +15 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker/taskdump.rs +79 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker/taskdump_mock.rs +7 -0
- data/rust-vendor/tokio/src/runtime/scheduler/multi_thread/worker.rs +1497 -0
- data/rust-vendor/tokio/src/runtime/scheduler/util/mod.rs +2 -0
- data/rust-vendor/tokio/src/runtime/scheduler/util/time_alt.rs +179 -0
- data/rust-vendor/tokio/src/runtime/signal/mod.rs +143 -0
- data/rust-vendor/tokio/src/runtime/task/abort.rs +105 -0
- data/rust-vendor/tokio/src/runtime/task/core.rs +570 -0
- data/rust-vendor/tokio/src/runtime/task/error.rs +198 -0
- data/rust-vendor/tokio/src/runtime/task/harness.rs +567 -0
- data/rust-vendor/tokio/src/runtime/task/id.rs +92 -0
- data/rust-vendor/tokio/src/runtime/task/join.rs +373 -0
- data/rust-vendor/tokio/src/runtime/task/list.rs +368 -0
- data/rust-vendor/tokio/src/runtime/task/mod.rs +670 -0
- data/rust-vendor/tokio/src/runtime/task/raw.rs +378 -0
- data/rust-vendor/tokio/src/runtime/task/state.rs +662 -0
- data/rust-vendor/tokio/src/runtime/task/trace/mod.rs +364 -0
- data/rust-vendor/tokio/src/runtime/task/trace/symbol.rs +92 -0
- data/rust-vendor/tokio/src/runtime/task/trace/tree.rs +126 -0
- data/rust-vendor/tokio/src/runtime/task/waker.rs +124 -0
- data/rust-vendor/tokio/src/runtime/task_hooks.rs +83 -0
- data/rust-vendor/tokio/src/runtime/tests/inject.rs +54 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_blocking.rs +102 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_current_thread/yield_now.rs +30 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_current_thread.rs +198 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_join_set.rs +82 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_local.rs +47 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_multi_thread/queue.rs +205 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_multi_thread/shutdown.rs +28 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_multi_thread/yield_now.rs +37 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_multi_thread.rs +461 -0
- data/rust-vendor/tokio/src/runtime/tests/loom_oneshot.rs +48 -0
- data/rust-vendor/tokio/src/runtime/tests/mod.rs +85 -0
- data/rust-vendor/tokio/src/runtime/tests/queue.rs +273 -0
- data/rust-vendor/tokio/src/runtime/tests/task.rs +469 -0
- data/rust-vendor/tokio/src/runtime/tests/task_combinations.rs +488 -0
- data/rust-vendor/tokio/src/runtime/thread_id.rs +31 -0
- data/rust-vendor/tokio/src/runtime/time/entry.rs +693 -0
- data/rust-vendor/tokio/src/runtime/time/handle.rs +68 -0
- data/rust-vendor/tokio/src/runtime/time/mod.rs +493 -0
- data/rust-vendor/tokio/src/runtime/time/source.rs +45 -0
- data/rust-vendor/tokio/src/runtime/time/tests/mod.rs +269 -0
- data/rust-vendor/tokio/src/runtime/time/wheel/level.rs +192 -0
- data/rust-vendor/tokio/src/runtime/time/wheel/mod.rs +331 -0
- data/rust-vendor/tokio/src/runtime/time_alt/cancellation_queue/tests.rs +97 -0
- data/rust-vendor/tokio/src/runtime/time_alt/cancellation_queue.rs +92 -0
- data/rust-vendor/tokio/src/runtime/time_alt/context.rs +47 -0
- data/rust-vendor/tokio/src/runtime/time_alt/entry.rs +276 -0
- data/rust-vendor/tokio/src/runtime/time_alt/mod.rs +24 -0
- data/rust-vendor/tokio/src/runtime/time_alt/registration_queue/tests.rs +53 -0
- data/rust-vendor/tokio/src/runtime/time_alt/registration_queue.rs +43 -0
- data/rust-vendor/tokio/src/runtime/time_alt/tests.rs +168 -0
- data/rust-vendor/tokio/src/runtime/time_alt/timer.rs +169 -0
- data/rust-vendor/tokio/src/runtime/time_alt/wake_queue/tests.rs +66 -0
- data/rust-vendor/tokio/src/runtime/time_alt/wake_queue.rs +50 -0
- data/rust-vendor/tokio/src/runtime/time_alt/wheel/level.rs +194 -0
- data/rust-vendor/tokio/src/runtime/time_alt/wheel/mod.rs +272 -0
- data/rust-vendor/tokio/src/signal/ctrl_c.rs +62 -0
- data/rust-vendor/tokio/src/signal/mod.rs +100 -0
- data/rust-vendor/tokio/src/signal/registry.rs +275 -0
- data/rust-vendor/tokio/src/signal/reusable_box.rs +230 -0
- data/rust-vendor/tokio/src/signal/unix.rs +570 -0
- data/rust-vendor/tokio/src/signal/windows/stub.rs +25 -0
- data/rust-vendor/tokio/src/signal/windows/sys.rs +244 -0
- data/rust-vendor/tokio/src/signal/windows.rs +526 -0
- data/rust-vendor/tokio/src/sync/barrier.rs +213 -0
- data/rust-vendor/tokio/src/sync/batch_semaphore.rs +780 -0
- data/rust-vendor/tokio/src/sync/broadcast.rs +1759 -0
- data/rust-vendor/tokio/src/sync/mod.rs +524 -0
- data/rust-vendor/tokio/src/sync/mpsc/block.rs +477 -0
- data/rust-vendor/tokio/src/sync/mpsc/bounded.rs +1949 -0
- data/rust-vendor/tokio/src/sync/mpsc/chan.rs +628 -0
- data/rust-vendor/tokio/src/sync/mpsc/error.rs +168 -0
- data/rust-vendor/tokio/src/sync/mpsc/list.rs +419 -0
- data/rust-vendor/tokio/src/sync/mpsc/mod.rs +144 -0
- data/rust-vendor/tokio/src/sync/mpsc/unbounded.rs +726 -0
- data/rust-vendor/tokio/src/sync/mutex.rs +1396 -0
- data/rust-vendor/tokio/src/sync/notify.rs +1409 -0
- data/rust-vendor/tokio/src/sync/once_cell.rs +512 -0
- data/rust-vendor/tokio/src/sync/oneshot.rs +1594 -0
- data/rust-vendor/tokio/src/sync/rwlock/owned_read_guard.rs +208 -0
- data/rust-vendor/tokio/src/sync/rwlock/owned_write_guard.rs +460 -0
- data/rust-vendor/tokio/src/sync/rwlock/owned_write_guard_mapped.rs +230 -0
- data/rust-vendor/tokio/src/sync/rwlock/read_guard.rs +191 -0
- data/rust-vendor/tokio/src/sync/rwlock/write_guard.rs +457 -0
- data/rust-vendor/tokio/src/sync/rwlock/write_guard_mapped.rs +213 -0
- data/rust-vendor/tokio/src/sync/rwlock.rs +1121 -0
- data/rust-vendor/tokio/src/sync/semaphore.rs +1206 -0
- data/rust-vendor/tokio/src/sync/set_once.rs +388 -0
- data/rust-vendor/tokio/src/sync/task/atomic_waker.rs +383 -0
- data/rust-vendor/tokio/src/sync/task/mod.rs +4 -0
- data/rust-vendor/tokio/src/sync/tests/atomic_waker.rs +113 -0
- data/rust-vendor/tokio/src/sync/tests/loom_atomic_waker.rs +100 -0
- data/rust-vendor/tokio/src/sync/tests/loom_broadcast.rs +207 -0
- data/rust-vendor/tokio/src/sync/tests/loom_list.rs +48 -0
- data/rust-vendor/tokio/src/sync/tests/loom_mpsc.rs +224 -0
- data/rust-vendor/tokio/src/sync/tests/loom_notify.rs +330 -0
- data/rust-vendor/tokio/src/sync/tests/loom_oneshot.rs +187 -0
- data/rust-vendor/tokio/src/sync/tests/loom_rwlock.rs +105 -0
- data/rust-vendor/tokio/src/sync/tests/loom_semaphore_batch.rs +242 -0
- data/rust-vendor/tokio/src/sync/tests/loom_set_once.rs +72 -0
- data/rust-vendor/tokio/src/sync/tests/loom_watch.rs +110 -0
- data/rust-vendor/tokio/src/sync/tests/mod.rs +18 -0
- data/rust-vendor/tokio/src/sync/tests/notify.rs +121 -0
- data/rust-vendor/tokio/src/sync/tests/semaphore_batch.rs +310 -0
- data/rust-vendor/tokio/src/sync/watch.rs +1556 -0
- data/rust-vendor/tokio/src/task/blocking.rs +212 -0
- data/rust-vendor/tokio/src/task/builder.rs +235 -0
- data/rust-vendor/tokio/src/task/coop/consume_budget.rs +39 -0
- data/rust-vendor/tokio/src/task/coop/mod.rs +573 -0
- data/rust-vendor/tokio/src/task/coop/unconstrained.rs +45 -0
- data/rust-vendor/tokio/src/task/join_set.rs +851 -0
- data/rust-vendor/tokio/src/task/local.rs +1353 -0
- data/rust-vendor/tokio/src/task/mod.rs +335 -0
- data/rust-vendor/tokio/src/task/spawn.rs +210 -0
- data/rust-vendor/tokio/src/task/task_local.rs +488 -0
- data/rust-vendor/tokio/src/task/yield_now.rs +64 -0
- data/rust-vendor/tokio/src/time/clock.rs +320 -0
- data/rust-vendor/tokio/src/time/error.rs +123 -0
- data/rust-vendor/tokio/src/time/instant.rs +223 -0
- data/rust-vendor/tokio/src/time/interval.rs +643 -0
- data/rust-vendor/tokio/src/time/mod.rs +110 -0
- data/rust-vendor/tokio/src/time/sleep.rs +469 -0
- data/rust-vendor/tokio/src/time/timeout.rs +234 -0
- data/rust-vendor/tokio/src/util/as_ref.rs +38 -0
- data/rust-vendor/tokio/src/util/atomic_cell.rs +51 -0
- data/rust-vendor/tokio/src/util/bit.rs +64 -0
- data/rust-vendor/tokio/src/util/blocking_check.rs +29 -0
- data/rust-vendor/tokio/src/util/cacheline.rs +89 -0
- data/rust-vendor/tokio/src/util/error.rs +16 -0
- data/rust-vendor/tokio/src/util/idle_notified_set.rs +512 -0
- data/rust-vendor/tokio/src/util/linked_list.rs +808 -0
- data/rust-vendor/tokio/src/util/markers.rs +9 -0
- data/rust-vendor/tokio/src/util/memchr.rs +74 -0
- data/rust-vendor/tokio/src/util/metric_atomics.rs +81 -0
- data/rust-vendor/tokio/src/util/mod.rs +110 -0
- data/rust-vendor/tokio/src/util/ptr_expose.rs +74 -0
- data/rust-vendor/tokio/src/util/rand/rt.rs +61 -0
- data/rust-vendor/tokio/src/util/rand/rt_unstable.rs +20 -0
- data/rust-vendor/tokio/src/util/rand.rs +95 -0
- data/rust-vendor/tokio/src/util/rc_cell.rs +57 -0
- data/rust-vendor/tokio/src/util/sharded_list.rs +162 -0
- data/rust-vendor/tokio/src/util/sync_wrapper.rs +37 -0
- data/rust-vendor/tokio/src/util/trace.rs +191 -0
- data/rust-vendor/tokio/src/util/try_lock.rs +80 -0
- data/rust-vendor/tokio/src/util/typeid.rs +45 -0
- data/rust-vendor/tokio/src/util/wake.rs +78 -0
- data/rust-vendor/tokio/src/util/wake_list.rs +83 -0
- data/rust-vendor/tokio/tests/_require_full.rs +8 -0
- data/rust-vendor/tokio/tests/async_send_sync.rs +778 -0
- data/rust-vendor/tokio/tests/buffered.rs +51 -0
- data/rust-vendor/tokio/tests/coop_budget.rs +93 -0
- data/rust-vendor/tokio/tests/dump.rs +199 -0
- data/rust-vendor/tokio/tests/duplex_stream.rs +47 -0
- data/rust-vendor/tokio/tests/fs.rs +36 -0
- data/rust-vendor/tokio/tests/fs_canonicalize_dir.rs +22 -0
- data/rust-vendor/tokio/tests/fs_copy.rs +41 -0
- data/rust-vendor/tokio/tests/fs_dir.rs +126 -0
- data/rust-vendor/tokio/tests/fs_file.rs +289 -0
- data/rust-vendor/tokio/tests/fs_link.rs +62 -0
- data/rust-vendor/tokio/tests/fs_open_options.rs +84 -0
- data/rust-vendor/tokio/tests/fs_open_options_windows.rs +51 -0
- data/rust-vendor/tokio/tests/fs_remove_dir_all.rs +31 -0
- data/rust-vendor/tokio/tests/fs_remove_file.rs +24 -0
- data/rust-vendor/tokio/tests/fs_rename.rs +28 -0
- data/rust-vendor/tokio/tests/fs_symlink_dir_windows.rs +31 -0
- data/rust-vendor/tokio/tests/fs_symlink_file_windows.rs +24 -0
- data/rust-vendor/tokio/tests/fs_try_exists.rs +48 -0
- data/rust-vendor/tokio/tests/fs_uring.rs +157 -0
- data/rust-vendor/tokio/tests/fs_uring_read.rs +202 -0
- data/rust-vendor/tokio/tests/fs_write.rs +16 -0
- data/rust-vendor/tokio/tests/io_async_fd.rs +958 -0
- data/rust-vendor/tokio/tests/io_async_read.rs +10 -0
- data/rust-vendor/tokio/tests/io_buf_reader.rs +379 -0
- data/rust-vendor/tokio/tests/io_buf_writer.rs +537 -0
- data/rust-vendor/tokio/tests/io_chain.rs +16 -0
- data/rust-vendor/tokio/tests/io_copy.rs +101 -0
- data/rust-vendor/tokio/tests/io_copy_bidirectional.rs +168 -0
- data/rust-vendor/tokio/tests/io_driver.rs +105 -0
- data/rust-vendor/tokio/tests/io_driver_drop.rs +62 -0
- data/rust-vendor/tokio/tests/io_fill_buf.rs +34 -0
- data/rust-vendor/tokio/tests/io_join.rs +81 -0
- data/rust-vendor/tokio/tests/io_lines.rs +19 -0
- data/rust-vendor/tokio/tests/io_mem_stream.rs +121 -0
- data/rust-vendor/tokio/tests/io_panic.rs +222 -0
- data/rust-vendor/tokio/tests/io_poll_aio.rs +339 -0
- data/rust-vendor/tokio/tests/io_read.rs +75 -0
- data/rust-vendor/tokio/tests/io_read_buf.rs +94 -0
- data/rust-vendor/tokio/tests/io_read_exact.rs +15 -0
- data/rust-vendor/tokio/tests/io_read_line.rs +107 -0
- data/rust-vendor/tokio/tests/io_read_to_end.rs +125 -0
- data/rust-vendor/tokio/tests/io_read_to_string.rs +63 -0
- data/rust-vendor/tokio/tests/io_read_until.rs +74 -0
- data/rust-vendor/tokio/tests/io_repeat.rs +18 -0
- data/rust-vendor/tokio/tests/io_sink.rs +44 -0
- data/rust-vendor/tokio/tests/io_split.rs +114 -0
- data/rust-vendor/tokio/tests/io_take.rs +74 -0
- data/rust-vendor/tokio/tests/io_util_empty.rs +61 -0
- data/rust-vendor/tokio/tests/io_write.rs +58 -0
- data/rust-vendor/tokio/tests/io_write_all.rs +51 -0
- data/rust-vendor/tokio/tests/io_write_all_buf.rs +145 -0
- data/rust-vendor/tokio/tests/io_write_buf.rs +56 -0
- data/rust-vendor/tokio/tests/io_write_int.rs +37 -0
- data/rust-vendor/tokio/tests/join_handle_panic.rs +21 -0
- data/rust-vendor/tokio/tests/macros_join.rs +256 -0
- data/rust-vendor/tokio/tests/macros_pin.rs +21 -0
- data/rust-vendor/tokio/tests/macros_rename_test.rs +35 -0
- data/rust-vendor/tokio/tests/macros_select.rs +760 -0
- data/rust-vendor/tokio/tests/macros_test.rs +117 -0
- data/rust-vendor/tokio/tests/macros_try_join.rs +269 -0
- data/rust-vendor/tokio/tests/net_bind_resource.rs +14 -0
- data/rust-vendor/tokio/tests/net_lookup_host.rs +39 -0
- data/rust-vendor/tokio/tests/net_named_pipe.rs +399 -0
- data/rust-vendor/tokio/tests/net_panic.rs +196 -0
- data/rust-vendor/tokio/tests/net_quickack.rs +71 -0
- data/rust-vendor/tokio/tests/net_unix_pipe.rs +546 -0
- data/rust-vendor/tokio/tests/no_rt.rs +47 -0
- data/rust-vendor/tokio/tests/process_arg0.rs +13 -0
- data/rust-vendor/tokio/tests/process_change_of_runtime.rs +34 -0
- data/rust-vendor/tokio/tests/process_issue_2174.rs +46 -0
- data/rust-vendor/tokio/tests/process_issue_42.rs +39 -0
- data/rust-vendor/tokio/tests/process_issue_7144.rs +28 -0
- data/rust-vendor/tokio/tests/process_kill_after_wait.rs +27 -0
- data/rust-vendor/tokio/tests/process_kill_on_drop.rs +44 -0
- data/rust-vendor/tokio/tests/process_raw_handle.rs +24 -0
- data/rust-vendor/tokio/tests/process_smoke.rs +34 -0
- data/rust-vendor/tokio/tests/rt_basic.rs +458 -0
- data/rust-vendor/tokio/tests/rt_common.rs +1438 -0
- data/rust-vendor/tokio/tests/rt_handle.rs +125 -0
- data/rust-vendor/tokio/tests/rt_handle_block_on.rs +567 -0
- data/rust-vendor/tokio/tests/rt_local.rs +170 -0
- data/rust-vendor/tokio/tests/rt_metrics.rs +233 -0
- data/rust-vendor/tokio/tests/rt_panic.rs +90 -0
- data/rust-vendor/tokio/tests/rt_poll_callbacks.rs +128 -0
- data/rust-vendor/tokio/tests/rt_threaded.rs +884 -0
- data/rust-vendor/tokio/tests/rt_time_start_paused.rs +14 -0
- data/rust-vendor/tokio/tests/rt_unstable_metrics.rs +821 -0
- data/rust-vendor/tokio/tests/signal_ctrl_c.rs +23 -0
- data/rust-vendor/tokio/tests/signal_drop_recv.rs +23 -0
- data/rust-vendor/tokio/tests/signal_drop_rt.rs +45 -0
- data/rust-vendor/tokio/tests/signal_drop_signal.rs +27 -0
- data/rust-vendor/tokio/tests/signal_info.rs +35 -0
- data/rust-vendor/tokio/tests/signal_multi_rt.rs +55 -0
- data/rust-vendor/tokio/tests/signal_no_rt.rs +13 -0
- data/rust-vendor/tokio/tests/signal_notify_both.rs +24 -0
- data/rust-vendor/tokio/tests/signal_panic.rs +31 -0
- data/rust-vendor/tokio/tests/signal_realtime.rs +105 -0
- data/rust-vendor/tokio/tests/signal_twice.rs +23 -0
- data/rust-vendor/tokio/tests/signal_usr1.rs +24 -0
- data/rust-vendor/tokio/tests/support/io_vec.rs +45 -0
- data/rust-vendor/tokio/tests/support/leaked_buffers.rs +26 -0
- data/rust-vendor/tokio/tests/support/mpsc_stream.rs +42 -0
- data/rust-vendor/tokio/tests/support/panic.rs +34 -0
- data/rust-vendor/tokio/tests/support/signal.rs +15 -0
- data/rust-vendor/tokio/tests/sync_barrier.rs +99 -0
- data/rust-vendor/tokio/tests/sync_broadcast.rs +722 -0
- data/rust-vendor/tokio/tests/sync_broadcast_weak.rs +181 -0
- data/rust-vendor/tokio/tests/sync_errors.rs +30 -0
- data/rust-vendor/tokio/tests/sync_mpsc.rs +1512 -0
- data/rust-vendor/tokio/tests/sync_mpsc_weak.rs +688 -0
- data/rust-vendor/tokio/tests/sync_mutex.rs +178 -0
- data/rust-vendor/tokio/tests/sync_mutex_owned.rs +137 -0
- data/rust-vendor/tokio/tests/sync_notify.rs +303 -0
- data/rust-vendor/tokio/tests/sync_notify_owned.rs +304 -0
- data/rust-vendor/tokio/tests/sync_once_cell.rs +250 -0
- data/rust-vendor/tokio/tests/sync_oneshot.rs +440 -0
- data/rust-vendor/tokio/tests/sync_panic.rs +231 -0
- data/rust-vendor/tokio/tests/sync_rwlock.rs +332 -0
- data/rust-vendor/tokio/tests/sync_semaphore.rs +176 -0
- data/rust-vendor/tokio/tests/sync_semaphore_owned.rs +164 -0
- data/rust-vendor/tokio/tests/sync_set_once.rs +180 -0
- data/rust-vendor/tokio/tests/sync_watch.rs +505 -0
- data/rust-vendor/tokio/tests/task_abort.rs +326 -0
- data/rust-vendor/tokio/tests/task_blocking.rs +310 -0
- data/rust-vendor/tokio/tests/task_builder.rs +105 -0
- data/rust-vendor/tokio/tests/task_hooks.rs +194 -0
- data/rust-vendor/tokio/tests/task_id.rs +300 -0
- data/rust-vendor/tokio/tests/task_join_set.rs +662 -0
- data/rust-vendor/tokio/tests/task_local.rs +171 -0
- data/rust-vendor/tokio/tests/task_local_set.rs +808 -0
- data/rust-vendor/tokio/tests/task_panic.rs +123 -0
- data/rust-vendor/tokio/tests/task_trace_self.rs +107 -0
- data/rust-vendor/tokio/tests/task_yield_now.rs +24 -0
- data/rust-vendor/tokio/tests/tcp_accept.rs +157 -0
- data/rust-vendor/tokio/tests/tcp_connect.rs +231 -0
- data/rust-vendor/tokio/tests/tcp_echo.rs +43 -0
- data/rust-vendor/tokio/tests/tcp_into_split.rs +132 -0
- data/rust-vendor/tokio/tests/tcp_into_std.rs +46 -0
- data/rust-vendor/tokio/tests/tcp_peek.rs +37 -0
- data/rust-vendor/tokio/tests/tcp_shutdown.rs +83 -0
- data/rust-vendor/tokio/tests/tcp_socket.rs +185 -0
- data/rust-vendor/tokio/tests/tcp_split.rs +43 -0
- data/rust-vendor/tokio/tests/tcp_stream.rs +407 -0
- data/rust-vendor/tokio/tests/test_clock.rs +50 -0
- data/rust-vendor/tokio/tests/time_alt.rs +108 -0
- data/rust-vendor/tokio/tests/time_interval.rs +477 -0
- data/rust-vendor/tokio/tests/time_panic.rs +139 -0
- data/rust-vendor/tokio/tests/time_pause.rs +333 -0
- data/rust-vendor/tokio/tests/time_rt.rs +166 -0
- data/rust-vendor/tokio/tests/time_sleep.rs +366 -0
- data/rust-vendor/tokio/tests/time_timeout.rs +151 -0
- data/rust-vendor/tokio/tests/time_wasm.rs +40 -0
- data/rust-vendor/tokio/tests/tracing_sync.rs +282 -0
- data/rust-vendor/tokio/tests/tracing_task.rs +186 -0
- data/rust-vendor/tokio/tests/tracing_time.rs +71 -0
- data/rust-vendor/tokio/tests/udp.rs +724 -0
- data/rust-vendor/tokio/tests/uds_cred.rs +26 -0
- data/rust-vendor/tokio/tests/uds_datagram.rs +425 -0
- data/rust-vendor/tokio/tests/uds_socket.rs +121 -0
- data/rust-vendor/tokio/tests/uds_split.rs +44 -0
- data/rust-vendor/tokio/tests/uds_stream.rs +446 -0
- data/rust-vendor/tokio/tests/unwindsafe.rs +42 -0
- data/rust-vendor/wasip2/.cargo-checksum.json +1 -1
- data/rust-vendor/wasip2/.cargo_vcs_info.json +1 -1
- data/rust-vendor/wasip2/Cargo.lock +9 -9
- data/rust-vendor/wasip2/Cargo.toml +3 -3
- data/rust-vendor/wasip2/Cargo.toml.orig +1 -1
- data/rust-vendor/wasip2/src/command.rs +95 -95
- data/rust-vendor/wasip2/src/imports.rs +283 -296
- data/rust-vendor/wasip2/src/proxy.rs +846 -842
- data/rust-vendor/wasip2/wit/deps/cli.wit +233 -0
- data/rust-vendor/wasip2/wit/deps/clocks.wit +162 -0
- data/rust-vendor/wasip2/wit/deps/filesystem.wit +587 -0
- data/rust-vendor/wasip2/wit/deps/http.wit +733 -0
- data/rust-vendor/wasip2/wit/deps/io.wit +299 -0
- data/rust-vendor/wasip2/wit/deps/random.wit +92 -0
- data/rust-vendor/wasip2/wit/deps/sockets.wit +949 -0
- data/rust-vendor/wasm-bindgen/.cargo-checksum.json +1 -1
- data/rust-vendor/wasm-bindgen/.cargo_vcs_info.json +1 -1
- data/rust-vendor/wasm-bindgen/Cargo.lock +21 -21
- data/rust-vendor/wasm-bindgen/Cargo.toml +6 -3
- data/rust-vendor/wasm-bindgen/Cargo.toml.orig +6 -4
- data/rust-vendor/wasm-bindgen/src/cast.rs +5 -1
- data/rust-vendor/wasm-bindgen/src/closure.rs +695 -245
- data/rust-vendor/wasm-bindgen/src/convert/closures.rs +324 -27
- data/rust-vendor/wasm-bindgen/src/convert/impls.rs +203 -5
- data/rust-vendor/wasm-bindgen/src/convert/slices.rs +36 -10
- data/rust-vendor/wasm-bindgen/src/convert/traits.rs +172 -1
- data/rust-vendor/wasm-bindgen/src/describe.rs +2 -2
- data/rust-vendor/wasm-bindgen/src/lib.rs +28 -7
- data/rust-vendor/wasm-bindgen/src/rt/marker.rs +104 -0
- data/rust-vendor/wasm-bindgen/src/rt/mod.rs +48 -47
- data/rust-vendor/wasm-bindgen/src/sys.rs +272 -0
- data/rust-vendor/wasm-bindgen-macro/.cargo-checksum.json +1 -1
- data/rust-vendor/wasm-bindgen-macro/.cargo_vcs_info.json +1 -1
- data/rust-vendor/wasm-bindgen-macro/Cargo.lock +27 -27
- data/rust-vendor/wasm-bindgen-macro/Cargo.toml +5 -2
- data/rust-vendor/wasm-bindgen-macro/Cargo.toml.orig +2 -2
- data/rust-vendor/wasm-bindgen-macro-support/.cargo-checksum.json +1 -1
- data/rust-vendor/wasm-bindgen-macro-support/.cargo_vcs_info.json +1 -1
- data/rust-vendor/wasm-bindgen-macro-support/Cargo.lock +13 -13
- data/rust-vendor/wasm-bindgen-macro-support/Cargo.toml +6 -2
- data/rust-vendor/wasm-bindgen-macro-support/Cargo.toml.orig +3 -3
- data/rust-vendor/wasm-bindgen-macro-support/src/ast.rs +14 -1
- data/rust-vendor/wasm-bindgen-macro-support/src/codegen.rs +789 -98
- data/rust-vendor/wasm-bindgen-macro-support/src/encode.rs +2 -0
- data/rust-vendor/wasm-bindgen-macro-support/src/generics.rs +805 -0
- data/rust-vendor/wasm-bindgen-macro-support/src/lib.rs +1 -0
- data/rust-vendor/wasm-bindgen-macro-support/src/parser.rs +209 -54
- data/rust-vendor/wasm-bindgen-shared/.cargo-checksum.json +1 -1
- data/rust-vendor/wasm-bindgen-shared/.cargo_vcs_info.json +1 -1
- data/rust-vendor/wasm-bindgen-shared/Cargo.lock +3 -3
- data/rust-vendor/wasm-bindgen-shared/Cargo.toml +4 -1
- data/rust-vendor/wasm-bindgen-shared/Cargo.toml.orig +1 -1
- data/rust-vendor/wasm-bindgen-shared/src/lib.rs +39 -1
- data/rust-vendor/wasm-bindgen-shared/src/schema_hash_approval.rs +1 -1
- data/rust-vendor/zerocopy/.cargo-checksum.json +1 -1
- data/rust-vendor/zerocopy/.cargo_vcs_info.json +1 -1
- data/rust-vendor/zerocopy/Cargo.lock +3 -188
- data/rust-vendor/zerocopy/Cargo.toml +7 -11
- data/rust-vendor/zerocopy/Cargo.toml.orig +5 -10
- data/rust-vendor/zerocopy/cargo.sh +2 -0
- data/rust-vendor/zerocopy/ci/check_fmt.sh +7 -6
- data/rust-vendor/zerocopy/ci/check_stale_stderr.sh +9 -0
- data/rust-vendor/zerocopy/ci/check_todo.sh +8 -1
- data/rust-vendor/zerocopy/githooks/pre-push +3 -3
- data/rust-vendor/zerocopy/src/macros.rs +4 -0
- data/rust-vendor/zerocopy/src/util/macro_util.rs +26 -11
- data/rust-vendor/zerocopy/tests/ui/diagnostic-not-implemented.msrv.stderr +99 -0
- data/rust-vendor/zerocopy/tests/ui/diagnostic-not-implemented.nightly.stderr +249 -0
- data/rust-vendor/zerocopy/tests/ui/diagnostic-not-implemented.rs +83 -0
- data/rust-vendor/zerocopy/tests/ui/diagnostic-not-implemented.stable.stderr +249 -0
- data/rust-vendor/zerocopy/tests/ui/include_value.msrv.stderr +19 -0
- data/rust-vendor/zerocopy/tests/ui/include_value.nightly.stderr +35 -0
- data/rust-vendor/zerocopy/tests/ui/include_value.rs +18 -0
- data/rust-vendor/zerocopy/tests/ui/include_value.stable.stderr +35 -0
- data/rust-vendor/zerocopy/tests/ui/late-compile-pass.msrv.stderr +135 -0
- data/rust-vendor/zerocopy/tests/ui/late-compile-pass.nightly.stderr +157 -0
- data/rust-vendor/zerocopy/tests/ui/late-compile-pass.rs +79 -0
- data/rust-vendor/zerocopy/tests/ui/late-compile-pass.stable.stderr +157 -0
- data/rust-vendor/zerocopy/tests/ui/max-align.msrv.stderr +9 -0
- data/rust-vendor/zerocopy/tests/ui/max-align.nightly.stderr +9 -0
- data/rust-vendor/zerocopy/tests/ui/max-align.rs +102 -0
- data/rust-vendor/zerocopy/tests/ui/max-align.stable.stderr +9 -0
- data/rust-vendor/zerocopy/tests/ui/ptr-is-invariant-over-v.msrv.stderr +21 -0
- data/rust-vendor/zerocopy/tests/ui/ptr-is-invariant-over-v.nightly.stderr +34 -0
- data/rust-vendor/zerocopy/tests/ui/ptr-is-invariant-over-v.rs +35 -0
- data/rust-vendor/zerocopy/tests/ui/ptr-is-invariant-over-v.stable.stderr +34 -0
- data/rust-vendor/zerocopy/tests/ui/transmute-ptr-to-usize.msrv.stderr +19 -0
- data/rust-vendor/zerocopy/tests/ui/transmute-ptr-to-usize.nightly.stderr +33 -0
- data/rust-vendor/zerocopy/tests/ui/transmute-ptr-to-usize.rs +22 -0
- data/rust-vendor/zerocopy/tests/ui/transmute-ptr-to-usize.stable.stderr +28 -0
- data/rust-vendor/zerocopy/tests/ui/transmute.msrv.stderr +35 -0
- data/rust-vendor/zerocopy/tests/ui/transmute.nightly.stderr +70 -0
- data/rust-vendor/zerocopy/tests/ui/transmute.rs +22 -0
- data/rust-vendor/zerocopy/tests/ui/transmute.stable.stderr +70 -0
- data/rust-vendor/zerocopy/tests/ui/transmute_mut.msrv.stderr +111 -0
- data/rust-vendor/zerocopy/tests/ui/transmute_mut.nightly.stderr +213 -0
- data/rust-vendor/zerocopy/tests/ui/transmute_mut.rs +89 -0
- data/rust-vendor/zerocopy/tests/ui/transmute_mut.stable.stderr +213 -0
- data/rust-vendor/zerocopy/tests/ui/transmute_ref.msrv.stderr +245 -0
- data/rust-vendor/zerocopy/tests/ui/transmute_ref.nightly.stderr +359 -0
- data/rust-vendor/zerocopy/tests/ui/transmute_ref.rs +86 -0
- data/rust-vendor/zerocopy/tests/ui/transmute_ref.stable.stderr +359 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute.msrv.stderr +54 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute.nightly.stderr +124 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute.rs +23 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute.stable.stderr +124 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute_mut.msrv.stderr +76 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute_mut.nightly.stderr +252 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute_mut.rs +49 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute_mut.stable.stderr +252 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute_ref.msrv.stderr +84 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute_ref.nightly.stderr +206 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute_ref.rs +36 -0
- data/rust-vendor/zerocopy/tests/ui/try_transmute_ref.stable.stderr +206 -0
- data/rust-vendor/zerocopy/tests/ui.rs +34 -0
- data/rust-vendor/zerocopy-derive/.cargo-checksum.json +1 -1
- data/rust-vendor/zerocopy-derive/.cargo_vcs_info.json +1 -1
- data/rust-vendor/zerocopy-derive/Cargo.lock +1 -180
- data/rust-vendor/zerocopy-derive/Cargo.toml +3 -13
- data/rust-vendor/zerocopy-derive/Cargo.toml.orig +1 -8
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(C).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i128).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i16).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i32).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i64).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(i8).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(isize).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u128).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u16).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u32).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u64).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(u8).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.repr(usize).expected.rs +40 -0
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_struct_basic.expected.rs +10 -1
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_struct_trailing.expected.rs +10 -1
- data/rust-vendor/zerocopy-derive/src/output_tests/mod.rs +4 -4
- data/rust-vendor/zerocopy-derive/src/util.rs +24 -5
- data/rust-vendor/zerocopy-derive/tests/enum_to_bytes.rs +9 -0
- data/rust-vendor/zerocopy-derive/tests/struct_to_bytes.rs +9 -0
- data/rust-vendor/zerocopy-derive/tests/ui/absence_of_deprecated_warning.msrv.stderr +14 -0
- data/rust-vendor/zerocopy-derive/tests/ui/absence_of_deprecated_warning.nightly.stderr +28 -0
- data/rust-vendor/zerocopy-derive/tests/ui/absence_of_deprecated_warning.rs +35 -0
- data/rust-vendor/zerocopy-derive/tests/ui/absence_of_deprecated_warning.stable.stderr +28 -0
- data/rust-vendor/zerocopy-derive/tests/ui/cfgs/union_into_bytes_cfg.msrv.stderr +15 -0
- data/rust-vendor/zerocopy-derive/tests/ui/derive_transparent.msrv.stderr +93 -0
- data/rust-vendor/zerocopy-derive/tests/ui/derive_transparent.nightly.stderr +198 -0
- data/rust-vendor/zerocopy-derive/tests/ui/derive_transparent.rs +48 -0
- data/rust-vendor/zerocopy-derive/tests/ui/derive_transparent.stable.stderr +173 -0
- data/rust-vendor/zerocopy-derive/tests/ui/enum.msrv.stderr +419 -0
- data/rust-vendor/zerocopy-derive/tests/ui/enum.nightly.stderr +601 -0
- data/rust-vendor/zerocopy-derive/tests/ui/enum.rs +688 -0
- data/rust-vendor/zerocopy-derive/tests/ui/enum.stable.stderr +549 -0
- data/rust-vendor/zerocopy-derive/tests/ui/enum_from_bytes_u8_too_few.msrv.stderr +14 -0
- data/rust-vendor/zerocopy-derive/tests/ui/enum_from_bytes_u8_too_few.nightly.stderr +14 -0
- data/rust-vendor/zerocopy-derive/tests/ui/enum_from_bytes_u8_too_few.rs +274 -0
- data/rust-vendor/zerocopy-derive/tests/ui/enum_from_bytes_u8_too_few.stable.stderr +14 -0
- data/rust-vendor/zerocopy-derive/tests/ui/late_compile_pass.msrv.stderr +101 -0
- data/rust-vendor/zerocopy-derive/tests/ui/late_compile_pass.nightly.stderr +335 -0
- data/rust-vendor/zerocopy-derive/tests/ui/late_compile_pass.rs +108 -0
- data/rust-vendor/zerocopy-derive/tests/ui/late_compile_pass.stable.stderr +295 -0
- data/rust-vendor/zerocopy-derive/tests/ui/mid_compile_pass.msrv.stderr +101 -0
- data/rust-vendor/zerocopy-derive/tests/ui/mid_compile_pass.nightly.stderr +114 -0
- data/rust-vendor/zerocopy-derive/tests/ui/mid_compile_pass.rs +70 -0
- data/rust-vendor/zerocopy-derive/tests/ui/mid_compile_pass.stable.stderr +114 -0
- data/rust-vendor/zerocopy-derive/tests/ui/msrv_specific.msrv.stderr +29 -0
- data/rust-vendor/zerocopy-derive/tests/ui/msrv_specific.nightly.stderr +45 -0
- data/rust-vendor/zerocopy-derive/tests/ui/msrv_specific.rs +40 -0
- data/rust-vendor/zerocopy-derive/tests/ui/msrv_specific.stable.stderr +45 -0
- data/rust-vendor/zerocopy-derive/tests/ui/privacy.msrv.stderr +147 -0
- data/rust-vendor/zerocopy-derive/tests/ui/privacy.nightly.stderr +32 -0
- data/rust-vendor/zerocopy-derive/tests/ui/privacy.rs +160 -0
- data/rust-vendor/zerocopy-derive/tests/ui/privacy.stable.stderr +32 -0
- data/rust-vendor/zerocopy-derive/tests/ui/struct.msrv.stderr +87 -0
- data/rust-vendor/zerocopy-derive/tests/ui/struct.nightly.stderr +554 -0
- data/rust-vendor/zerocopy-derive/tests/ui/struct.rs +339 -0
- data/rust-vendor/zerocopy-derive/tests/ui/struct.stable.stderr +522 -0
- data/rust-vendor/zerocopy-derive/tests/ui/union.msrv.stderr +88 -0
- data/rust-vendor/zerocopy-derive/tests/ui/union.nightly.stderr +130 -0
- data/rust-vendor/zerocopy-derive/tests/ui/union.rs +134 -0
- data/rust-vendor/zerocopy-derive/tests/ui/union.stable.stderr +125 -0
- data/rust-vendor/zerocopy-derive/tests/ui.rs +28 -0
- data/rust-vendor/zerocopy-derive/tests/union_to_bytes.rs +9 -0
- metadata +1263 -458
- data/ext/html-to-markdown-rb/native/Cargo.lock +0 -1591
- data/rust-vendor/futf/.cargo-checksum.json +0 -1
- data/rust-vendor/futf/.cargo_vcs_info.json +0 -6
- data/rust-vendor/futf/.travis.yml +0 -11
- data/rust-vendor/futf/Cargo.toml +0 -24
- data/rust-vendor/futf/Cargo.toml.orig +0 -12
- data/rust-vendor/futf/LICENSE-APACHE +0 -201
- data/rust-vendor/futf/LICENSE-MIT +0 -25
- data/rust-vendor/futf/README.md +0 -18
- data/rust-vendor/futf/src/lib.rs +0 -248
- data/rust-vendor/futf/src/test.rs +0 -270
- data/rust-vendor/html5ever/examples/capi/tokenize.c +0 -74
- data/rust-vendor/mac/.cargo-checksum.json +0 -1
- data/rust-vendor/mac/.travis.yml +0 -19
- data/rust-vendor/mac/Cargo.toml +0 -10
- data/rust-vendor/mac/README.md +0 -27
- data/rust-vendor/mac/src/cfg.rs +0 -90
- data/rust-vendor/mac/src/format.rs +0 -50
- data/rust-vendor/mac/src/inspect.rs +0 -93
- data/rust-vendor/mac/src/lib.rs +0 -71
- data/rust-vendor/mac/src/matches.rs +0 -44
- data/rust-vendor/mac/src/mem.rs +0 -44
- data/rust-vendor/mac/src/syntax_ext.rs +0 -31
- data/rust-vendor/mac/src/test.rs +0 -24
- data/rust-vendor/markup5ever/Cargo.lock +0 -292
- data/rust-vendor/tendril/.github/workflows/main.yml +0 -51
- data/rust-vendor/tendril/src/bench.rs +0 -159
- data/rust-vendor/wasip2/wit/deps/cli/command.wit +0 -10
- data/rust-vendor/wasip2/wit/deps/cli/environment.wit +0 -22
- data/rust-vendor/wasip2/wit/deps/cli/exit.wit +0 -17
- data/rust-vendor/wasip2/wit/deps/cli/imports.wit +0 -36
- data/rust-vendor/wasip2/wit/deps/cli/run.wit +0 -6
- data/rust-vendor/wasip2/wit/deps/cli/stdio.wit +0 -26
- data/rust-vendor/wasip2/wit/deps/cli/terminal.wit +0 -62
- data/rust-vendor/wasip2/wit/deps/clocks/monotonic-clock.wit +0 -50
- data/rust-vendor/wasip2/wit/deps/clocks/timezone.wit +0 -55
- data/rust-vendor/wasip2/wit/deps/clocks/wall-clock.wit +0 -46
- data/rust-vendor/wasip2/wit/deps/clocks/world.wit +0 -11
- data/rust-vendor/wasip2/wit/deps/filesystem/preopens.wit +0 -11
- data/rust-vendor/wasip2/wit/deps/filesystem/types.wit +0 -676
- data/rust-vendor/wasip2/wit/deps/filesystem/world.wit +0 -9
- data/rust-vendor/wasip2/wit/deps/http/handler.wit +0 -49
- data/rust-vendor/wasip2/wit/deps/http/proxy.wit +0 -50
- data/rust-vendor/wasip2/wit/deps/http/types.wit +0 -688
- data/rust-vendor/wasip2/wit/deps/io/error.wit +0 -34
- data/rust-vendor/wasip2/wit/deps/io/poll.wit +0 -47
- data/rust-vendor/wasip2/wit/deps/io/streams.wit +0 -290
- data/rust-vendor/wasip2/wit/deps/io/world.wit +0 -10
- data/rust-vendor/wasip2/wit/deps/random/insecure-seed.wit +0 -27
- data/rust-vendor/wasip2/wit/deps/random/insecure.wit +0 -25
- data/rust-vendor/wasip2/wit/deps/random/random.wit +0 -29
- data/rust-vendor/wasip2/wit/deps/random/world.wit +0 -13
- data/rust-vendor/wasip2/wit/deps/sockets/instance-network.wit +0 -11
- data/rust-vendor/wasip2/wit/deps/sockets/ip-name-lookup.wit +0 -56
- data/rust-vendor/wasip2/wit/deps/sockets/network.wit +0 -169
- data/rust-vendor/wasip2/wit/deps/sockets/tcp-create-socket.wit +0 -30
- data/rust-vendor/wasip2/wit/deps/sockets/tcp.wit +0 -387
- data/rust-vendor/wasip2/wit/deps/sockets/udp-create-socket.wit +0 -30
- data/rust-vendor/wasip2/wit/deps/sockets/udp.wit +0 -288
- data/rust-vendor/wasip2/wit/deps/sockets/world.wit +0 -19
- data/rust-vendor/wit-bindgen-0.46.0/.cargo-checksum.json +0 -1
- data/rust-vendor/wit-bindgen-0.46.0/.cargo_vcs_info.json +0 -6
- data/rust-vendor/wit-bindgen-0.46.0/Cargo.lock +0 -428
- data/rust-vendor/wit-bindgen-0.46.0/Cargo.toml +0 -88
- data/rust-vendor/wit-bindgen-0.46.0/Cargo.toml.orig +0 -37
- data/rust-vendor/wit-bindgen-0.46.0/LICENSE-APACHE +0 -201
- data/rust-vendor/wit-bindgen-0.46.0/LICENSE-Apache-2.0_WITH_LLVM-exception +0 -220
- data/rust-vendor/wit-bindgen-0.46.0/README.md +0 -45
- data/rust-vendor/wit-bindgen-0.46.0/build.rs +0 -32
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_0_world_imports.rs +0 -17
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_1_interface_imports.rs +0 -32
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_2_imported_resources.rs +0 -22
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_3_world_exports.rs +0 -47
- data/rust-vendor/wit-bindgen-0.46.0/src/examples/_4_exported_resources.rs +0 -26
- data/rust-vendor/wit-bindgen-0.46.0/src/examples.rs +0 -55
- data/rust-vendor/wit-bindgen-0.46.0/src/lib.rs +0 -881
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/abi_buffer.rs +0 -417
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/cabi.rs +0 -112
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/error_context.rs +0 -94
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/future_support.rs +0 -734
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/stream_support.rs +0 -604
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/subtask.rs +0 -289
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/waitable.rs +0 -466
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support/waitable_set.rs +0 -100
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/async_support.rs +0 -634
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/mod.rs +0 -230
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi.c +0 -20
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi.o +0 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.c +0 -10
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.o +0 -0
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_realloc.rs +0 -11
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_wasip3.c +0 -12
- data/rust-vendor/wit-bindgen-0.46.0/src/rt/wit_bindgen_cabi_wasip3.o +0 -0
- data/rust-vendor/wit-bindgen-0.46.0/wasi-cli@0.2.0.wasm +0 -0
- data/rust-vendor/zerocopy/tests/trybuild.rs +0 -40
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-bytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-bytes.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-zeros.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-from-zeros.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-immutable.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-immutable.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-into-bytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-into-bytes.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-issue-1296.rs +0 -57
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-issue-1296.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-known-layout.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-known-layout.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-try-from-bytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-try-from-bytes.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-unaligned.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-msrv/diagnostic-not-implemented-unaligned.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-msrv/include_value_not_from_bytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-msrv/include_value_not_from_bytes.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/include_value_wrong_size.rs +0 -12
- data/rust-vendor/zerocopy/tests/ui-msrv/include_value_wrong_size.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-msrv/max-align.rs +0 -99
- data/rust-vendor/zerocopy/tests/ui-msrv/max-align.stderr +0 -5
- data/rust-vendor/zerocopy/tests/ui-msrv/ptr-is-invariant-over-v.rs +0 -29
- data/rust-vendor/zerocopy/tests/ui-msrv/ptr-is-invariant-over-v.stderr +0 -17
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-dst-not-frombytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-dst-not-frombytes.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-const.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-const.stderr +0 -48
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-a-reference.stderr +0 -19
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-frombytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-frombytes.stderr +0 -7
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-intobytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-dst-not-intobytes.stderr +0 -7
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-illegal-lifetime.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-illegal-lifetime.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-dst-not-references.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-dst-not-references.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-immutable.rs +0 -16
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-immutable.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-a-reference.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-frombytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-frombytes.stderr +0 -7
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-intobytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-not-intobytes.stderr +0 -7
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-unsized.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-mut-src-unsized.stderr +0 -16
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ptr-to-usize.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ptr-to-usize.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-mutable.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-mutable.stderr +0 -39
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-a-reference.stderr +0 -39
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-frombytes.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-frombytes.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-nocell.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-dst-not-nocell.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-illegal-lifetime.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-illegal-lifetime.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-dst-not-references.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-dst-not-references.stderr +0 -52
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-a-reference.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-intobytes.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-intobytes.stderr +0 -25
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-nocell.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-not-nocell.stderr +0 -25
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-unsized.rs +0 -14
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-ref-src-unsized.stderr +0 -16
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-decrease.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-decrease.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase-allow-shrink.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase-allow-shrink.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-size-increase.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-src-not-intobytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-msrv/transmute-src-not-intobytes.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-dst-not-tryfrombytes.rs +0 -16
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-dst-not-tryfrombytes.stderr +0 -37
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-decrease.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-decrease.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-increase.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-size-increase.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-src-not-intobytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute-src-not-intobytes.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-dst-not-tryfrombytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-dst-not-tryfrombytes.stderr +0 -40
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-frombytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-frombytes.stderr +0 -23
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-intobytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_mut-src-not-intobytes.stderr +0 -23
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-mutable.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-mutable.stderr +0 -22
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-not-immutable-tryfrombytes.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +0 -40
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-src-not-immutable-intobytes.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-msrv/try_transmute_ref-src-not-immutable-intobytes.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-bytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-bytes.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-zeros.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-from-zeros.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-immutable.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-immutable.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-into-bytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-into-bytes.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-issue-1296.rs +0 -57
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-issue-1296.stderr +0 -49
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-known-layout.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-known-layout.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-try-from-bytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-try-from-bytes.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-unaligned.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-nightly/diagnostic-not-implemented-unaligned.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-nightly/include_value_not_from_bytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/include_value_not_from_bytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/include_value_wrong_size.rs +0 -12
- data/rust-vendor/zerocopy/tests/ui-nightly/include_value_wrong_size.stderr +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/max-align.rs +0 -99
- data/rust-vendor/zerocopy/tests/ui-nightly/max-align.stderr +0 -5
- data/rust-vendor/zerocopy/tests/ui-nightly/ptr-is-invariant-over-v.rs +0 -29
- data/rust-vendor/zerocopy/tests/ui-nightly/ptr-is-invariant-over-v.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-dst-not-frombytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-dst-not-frombytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-const.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-const.stderr +0 -32
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-a-reference.stderr +0 -19
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-frombytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-frombytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-intobytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-dst-not-intobytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-illegal-lifetime.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-illegal-lifetime.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-dst-not-references.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-dst-not-references.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-immutable.rs +0 -16
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-immutable.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-a-reference.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-frombytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-frombytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-intobytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-not-intobytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-unsized.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-mut-src-unsized.stderr +0 -16
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ptr-to-usize.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ptr-to-usize.stderr +0 -29
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-mutable.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-mutable.stderr +0 -39
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-a-reference.stderr +0 -39
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-frombytes.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-frombytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-nocell.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-dst-not-nocell.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-illegal-lifetime.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-illegal-lifetime.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-dst-not-references.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-dst-not-references.stderr +0 -55
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-a-reference.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-intobytes.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-intobytes.stderr +0 -60
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-nocell.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-not-nocell.stderr +0 -60
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-unsized.rs +0 -14
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-ref-src-unsized.stderr +0 -16
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-decrease.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-decrease.stderr +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase-allow-shrink.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase-allow-shrink.stderr +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-size-increase.stderr +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-src-not-intobytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/transmute-src-not-intobytes.stderr +0 -34
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.rs +0 -16
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-dst-not-tryfrombytes.stderr +0 -88
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-decrease.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-decrease.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-increase.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-size-increase.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-src-not-intobytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute-src-not-intobytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-dst-not-tryfrombytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-dst-not-tryfrombytes.stderr +0 -120
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-frombytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-frombytes.stderr +0 -95
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-intobytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_mut-src-not-intobytes.stderr +0 -95
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-mutable.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-mutable.stderr +0 -32
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +0 -120
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-src-not-immutable-intobytes.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-nightly/try_transmute_ref-src-not-immutable-intobytes.stderr +0 -63
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-bytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-bytes.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-zeros.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-from-zeros.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-immutable.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-immutable.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-into-bytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-into-bytes.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-issue-1296.rs +0 -57
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-issue-1296.stderr +0 -49
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-known-layout.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-known-layout.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-try-from-bytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-try-from-bytes.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-unaligned.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-stable/diagnostic-not-implemented-unaligned.stderr +0 -27
- data/rust-vendor/zerocopy/tests/ui-stable/include_value_not_from_bytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/include_value_not_from_bytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/include_value_wrong_size.rs +0 -12
- data/rust-vendor/zerocopy/tests/ui-stable/include_value_wrong_size.stderr +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/max-align.rs +0 -99
- data/rust-vendor/zerocopy/tests/ui-stable/max-align.stderr +0 -5
- data/rust-vendor/zerocopy/tests/ui-stable/ptr-is-invariant-over-v.rs +0 -29
- data/rust-vendor/zerocopy/tests/ui-stable/ptr-is-invariant-over-v.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-dst-not-frombytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-dst-not-frombytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-const.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-const.stderr +0 -32
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-a-reference.stderr +0 -19
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-frombytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-frombytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-intobytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-dst-not-intobytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-illegal-lifetime.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-illegal-lifetime.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-dst-not-references.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-dst-not-references.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-immutable.rs +0 -16
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-immutable.stderr +0 -11
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-a-reference.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-frombytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-frombytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-intobytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-not-intobytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-unsized.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-mut-src-unsized.stderr +0 -16
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ptr-to-usize.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ptr-to-usize.stderr +0 -24
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-mutable.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-mutable.stderr +0 -39
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-a-reference.stderr +0 -39
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-frombytes.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-frombytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-nocell.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-dst-not-nocell.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-illegal-lifetime.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-illegal-lifetime.stderr +0 -12
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-dst-not-references.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-dst-not-references.stderr +0 -55
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-a-reference.rs +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-a-reference.stderr +0 -15
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-intobytes.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-intobytes.stderr +0 -60
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-nocell.rs +0 -21
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-not-nocell.stderr +0 -60
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-unsized.rs +0 -14
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-ref-src-unsized.stderr +0 -16
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-decrease.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-decrease.stderr +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase-allow-shrink.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase-allow-shrink.stderr +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-size-increase.stderr +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-src-not-intobytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/transmute-src-not-intobytes.stderr +0 -34
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-dst-not-tryfrombytes.rs +0 -16
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-dst-not-tryfrombytes.stderr +0 -88
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-decrease.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-decrease.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-increase.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-size-increase.stderr +0 -9
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-src-not-intobytes.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute-src-not-intobytes.stderr +0 -31
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-dst-not-tryfrombytes.rs +0 -19
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-dst-not-tryfrombytes.stderr +0 -120
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-frombytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-frombytes.stderr +0 -95
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-intobytes.rs +0 -22
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_mut-src-not-intobytes.stderr +0 -95
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-mutable.rs +0 -17
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-mutable.stderr +0 -32
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-not-immutable-tryfrombytes.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-dst-not-immutable-tryfrombytes.stderr +0 -120
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.rs +0 -18
- data/rust-vendor/zerocopy/tests/ui-stable/try_transmute_ref-src-not-immutable-intobytes.stderr +0 -63
- data/rust-vendor/zerocopy-derive/src/output_tests/expected/into_bytes_enum.expected.rs +0 -17
- data/rust-vendor/zerocopy-derive/tests/trybuild.rs +0 -62
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/cfgs/union_into_bytes_cfg.stderr +0 -8
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/derive_transparent.rs +0 -39
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/derive_transparent.stderr +0 -89
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum.rs +0 -624
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum.stderr +0 -399
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum_from_bytes_u8_too_few.rs +0 -273
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/enum_from_bytes_u8_too_few.stderr +0 -11
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/late_compile_pass.rs +0 -92
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/late_compile_pass.stderr +0 -97
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/mid_compile_pass.rs +0 -65
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/mid_compile_pass.stderr +0 -97
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/msrv_specific.rs +0 -39
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/msrv_specific.stderr +0 -25
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/privacy.rs +0 -139
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/privacy.stderr +0 -143
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/struct.rs +0 -286
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/struct.stderr +0 -281
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/union.rs +0 -120
- data/rust-vendor/zerocopy-derive/tests/ui-msrv/union.stderr +0 -84
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/absence_of_deprecated_warning.rs +0 -34
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/absence_of_deprecated_warning.stderr +0 -11
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/on_error.rs +0 -19
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/cfgs/union_into_bytes_cfg.rs +0 -27
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/derive_transparent.rs +0 -39
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/derive_transparent.stderr +0 -194
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum.rs +0 -624
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum.stderr +0 -578
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum_from_bytes_u8_too_few.rs +0 -273
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/enum_from_bytes_u8_too_few.stderr +0 -11
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/late_compile_pass.rs +0 -92
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/late_compile_pass.stderr +0 -331
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/mid_compile_pass.rs +0 -65
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/mid_compile_pass.stderr +0 -109
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/privacy.rs +0 -139
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/privacy.stderr +0 -17
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/struct.rs +0 -286
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/struct.stderr +0 -555
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/union.rs +0 -120
- data/rust-vendor/zerocopy-derive/tests/ui-nightly/union.stderr +0 -128
- data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/on_error.rs +0 -19
- data/rust-vendor/zerocopy-derive/tests/ui-stable/cfgs/union_into_bytes_cfg.rs +0 -27
- data/rust-vendor/zerocopy-derive/tests/ui-stable/derive_transparent.rs +0 -39
- data/rust-vendor/zerocopy-derive/tests/ui-stable/derive_transparent.stderr +0 -169
- data/rust-vendor/zerocopy-derive/tests/ui-stable/enum.rs +0 -624
- data/rust-vendor/zerocopy-derive/tests/ui-stable/enum.stderr +0 -523
- data/rust-vendor/zerocopy-derive/tests/ui-stable/enum_from_bytes_u8_too_few.rs +0 -273
- data/rust-vendor/zerocopy-derive/tests/ui-stable/enum_from_bytes_u8_too_few.stderr +0 -11
- data/rust-vendor/zerocopy-derive/tests/ui-stable/late_compile_pass.rs +0 -92
- data/rust-vendor/zerocopy-derive/tests/ui-stable/late_compile_pass.stderr +0 -291
- data/rust-vendor/zerocopy-derive/tests/ui-stable/mid_compile_pass.rs +0 -65
- data/rust-vendor/zerocopy-derive/tests/ui-stable/mid_compile_pass.stderr +0 -109
- data/rust-vendor/zerocopy-derive/tests/ui-stable/privacy.rs +0 -139
- data/rust-vendor/zerocopy-derive/tests/ui-stable/privacy.stderr +0 -17
- data/rust-vendor/zerocopy-derive/tests/ui-stable/struct.rs +0 -286
- data/rust-vendor/zerocopy-derive/tests/ui-stable/struct.stderr +0 -499
- data/rust-vendor/zerocopy-derive/tests/ui-stable/union.rs +0 -120
- data/rust-vendor/zerocopy-derive/tests/ui-stable/union.stderr +0 -120
- /data/rust-vendor/{wit-bindgen-0.46.0 → async-trait}/LICENSE-MIT +0 -0
- /data/rust-vendor/zerocopy-derive/tests/{ui-msrv/cfgs/on_error.stderr → ui/cfgs/on_error.msrv.stderr} +0 -0
- /data/rust-vendor/zerocopy-derive/tests/{ui-nightly/cfgs/on_error.stderr → ui/cfgs/on_error.nightly.stderr} +0 -0
- /data/rust-vendor/zerocopy-derive/tests/{ui-msrv → ui}/cfgs/on_error.rs +0 -0
- /data/rust-vendor/zerocopy-derive/tests/{ui-stable/cfgs/on_error.stderr → ui/cfgs/on_error.stable.stderr} +0 -0
- /data/rust-vendor/zerocopy-derive/tests/{ui-nightly/cfgs/union_into_bytes_cfg.stderr → ui/cfgs/union_into_bytes_cfg.nightly.stderr} +0 -0
- /data/rust-vendor/zerocopy-derive/tests/{ui-msrv → ui}/cfgs/union_into_bytes_cfg.rs +0 -0
- /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,1468 @@
|
|
|
1
|
+
//! A multi-producer, single-consumer queue for sending values across
|
|
2
|
+
//! asynchronous tasks.
|
|
3
|
+
//!
|
|
4
|
+
//! Similarly to the `std`, channel creation provides [`Receiver`] and
|
|
5
|
+
//! [`Sender`] handles. [`Receiver`] implements [`Stream`] and allows a task to
|
|
6
|
+
//! read values out of the channel. If there is no message to read from the
|
|
7
|
+
//! channel, the current task will be notified when a new value is sent.
|
|
8
|
+
//! [`Sender`] implements the `Sink` trait and allows a task to send messages into
|
|
9
|
+
//! the channel. If the channel is at capacity, the send will be rejected and
|
|
10
|
+
//! the task will be notified when additional capacity is available. In other
|
|
11
|
+
//! words, the channel provides backpressure.
|
|
12
|
+
//!
|
|
13
|
+
//! Unbounded channels are also available using the `unbounded` constructor.
|
|
14
|
+
//!
|
|
15
|
+
//! # Disconnection
|
|
16
|
+
//!
|
|
17
|
+
//! When all [`Sender`] handles have been dropped, it is no longer
|
|
18
|
+
//! possible to send values into the channel. This is considered the termination
|
|
19
|
+
//! event of the stream. As such, [`Receiver::poll_next`]
|
|
20
|
+
//! will return `Ok(Ready(None))`.
|
|
21
|
+
//!
|
|
22
|
+
//! If the [`Receiver`] handle is dropped, then messages can no longer
|
|
23
|
+
//! be read out of the channel. In this case, all further attempts to send will
|
|
24
|
+
//! result in an error.
|
|
25
|
+
//!
|
|
26
|
+
//! # Clean Shutdown
|
|
27
|
+
//!
|
|
28
|
+
//! If the [`Receiver`] is simply dropped, then it is possible for
|
|
29
|
+
//! there to be messages still in the channel that will not be processed. As
|
|
30
|
+
//! such, it is usually desirable to perform a "clean" shutdown. To do this, the
|
|
31
|
+
//! receiver will first call `close`, which will prevent any further messages to
|
|
32
|
+
//! be sent into the channel. Then, the receiver consumes the channel to
|
|
33
|
+
//! completion, at which point the receiver can be dropped.
|
|
34
|
+
//!
|
|
35
|
+
//! [`Sender`]: struct.Sender.html
|
|
36
|
+
//! [`Receiver`]: struct.Receiver.html
|
|
37
|
+
//! [`Stream`]: ../../futures_core/stream/trait.Stream.html
|
|
38
|
+
//! [`Receiver::poll_next`]:
|
|
39
|
+
//! ../../futures_core/stream/trait.Stream.html#tymethod.poll_next
|
|
40
|
+
|
|
41
|
+
// At the core, the channel uses an atomic FIFO queue for message passing. This
|
|
42
|
+
// queue is used as the primary coordination primitive. In order to enforce
|
|
43
|
+
// capacity limits and handle back pressure, a secondary FIFO queue is used to
|
|
44
|
+
// send parked task handles.
|
|
45
|
+
//
|
|
46
|
+
// The general idea is that the channel is created with a `buffer` size of `n`.
|
|
47
|
+
// The channel capacity is `n + num-senders`. Each sender gets one "guaranteed"
|
|
48
|
+
// slot to hold a message. This allows `Sender` to know for a fact that a send
|
|
49
|
+
// will succeed *before* starting to do the actual work of sending the value.
|
|
50
|
+
// Since most of this work is lock-free, once the work starts, it is impossible
|
|
51
|
+
// to safely revert.
|
|
52
|
+
//
|
|
53
|
+
// If the sender is unable to process a send operation, then the current
|
|
54
|
+
// task is parked and the handle is sent on the parked task queue.
|
|
55
|
+
//
|
|
56
|
+
// Note that the implementation guarantees that the channel capacity will never
|
|
57
|
+
// exceed the configured limit, however there is no *strict* guarantee that the
|
|
58
|
+
// receiver will wake up a parked task *immediately* when a slot becomes
|
|
59
|
+
// available. However, it will almost always unpark a task when a slot becomes
|
|
60
|
+
// available and it is *guaranteed* that a sender will be unparked when the
|
|
61
|
+
// message that caused the sender to become parked is read out of the channel.
|
|
62
|
+
//
|
|
63
|
+
// The steps for sending a message are roughly:
|
|
64
|
+
//
|
|
65
|
+
// 1) Increment the channel message count
|
|
66
|
+
// 2) If the channel is at capacity, push the task handle onto the wait queue
|
|
67
|
+
// 3) Push the message onto the message queue.
|
|
68
|
+
//
|
|
69
|
+
// The steps for receiving a message are roughly:
|
|
70
|
+
//
|
|
71
|
+
// 1) Pop a message from the message queue
|
|
72
|
+
// 2) Pop a task handle from the wait queue
|
|
73
|
+
// 3) Decrement the channel message count.
|
|
74
|
+
//
|
|
75
|
+
// It's important for the order of operations on lock-free structures to happen
|
|
76
|
+
// in reverse order between the sender and receiver. This makes the message
|
|
77
|
+
// queue the primary coordination structure and establishes the necessary
|
|
78
|
+
// happens-before semantics required for the acquire / release semantics used
|
|
79
|
+
// by the queue structure.
|
|
80
|
+
|
|
81
|
+
use core::future::Future;
|
|
82
|
+
use futures_core::stream::{FusedStream, Stream};
|
|
83
|
+
use futures_core::task::__internal::AtomicWaker;
|
|
84
|
+
use futures_core::task::{Context, Poll, Waker};
|
|
85
|
+
use futures_core::FusedFuture;
|
|
86
|
+
use std::fmt;
|
|
87
|
+
use std::pin::Pin;
|
|
88
|
+
use std::sync::atomic::AtomicUsize;
|
|
89
|
+
use std::sync::atomic::Ordering::SeqCst;
|
|
90
|
+
use std::sync::{Arc, Mutex};
|
|
91
|
+
use std::thread;
|
|
92
|
+
|
|
93
|
+
use crate::mpsc::queue::Queue;
|
|
94
|
+
|
|
95
|
+
mod queue;
|
|
96
|
+
#[cfg(feature = "sink")]
|
|
97
|
+
mod sink_impl;
|
|
98
|
+
|
|
99
|
+
struct UnboundedSenderInner<T> {
|
|
100
|
+
// Channel state shared between the sender and receiver.
|
|
101
|
+
inner: Arc<UnboundedInner<T>>,
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
struct BoundedSenderInner<T> {
|
|
105
|
+
// Channel state shared between the sender and receiver.
|
|
106
|
+
inner: Arc<BoundedInner<T>>,
|
|
107
|
+
|
|
108
|
+
// Handle to the task that is blocked on this sender. This handle is sent
|
|
109
|
+
// to the receiver half in order to be notified when the sender becomes
|
|
110
|
+
// unblocked.
|
|
111
|
+
sender_task: Arc<Mutex<SenderTask>>,
|
|
112
|
+
|
|
113
|
+
// `true` if the sender might be blocked. This is an optimization to avoid
|
|
114
|
+
// having to lock the mutex most of the time.
|
|
115
|
+
maybe_parked: bool,
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// We never project Pin<&mut SenderInner> to `Pin<&mut T>`
|
|
119
|
+
impl<T> Unpin for UnboundedSenderInner<T> {}
|
|
120
|
+
impl<T> Unpin for BoundedSenderInner<T> {}
|
|
121
|
+
|
|
122
|
+
/// The transmission end of a bounded mpsc channel.
|
|
123
|
+
///
|
|
124
|
+
/// This value is created by the [`channel`] function.
|
|
125
|
+
pub struct Sender<T>(Option<BoundedSenderInner<T>>);
|
|
126
|
+
|
|
127
|
+
/// The transmission end of an unbounded mpsc channel.
|
|
128
|
+
///
|
|
129
|
+
/// This value is created by the [`unbounded`] function.
|
|
130
|
+
pub struct UnboundedSender<T>(Option<UnboundedSenderInner<T>>);
|
|
131
|
+
|
|
132
|
+
#[allow(dead_code)]
|
|
133
|
+
trait AssertKinds: Send + Sync + Clone {}
|
|
134
|
+
impl AssertKinds for UnboundedSender<u32> {}
|
|
135
|
+
|
|
136
|
+
/// The receiving end of a bounded mpsc channel.
|
|
137
|
+
///
|
|
138
|
+
/// This value is created by the [`channel`] function.
|
|
139
|
+
pub struct Receiver<T> {
|
|
140
|
+
inner: Option<Arc<BoundedInner<T>>>,
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/// The receiving end of an unbounded mpsc channel.
|
|
144
|
+
///
|
|
145
|
+
/// This value is created by the [`unbounded`] function.
|
|
146
|
+
pub struct UnboundedReceiver<T> {
|
|
147
|
+
inner: Option<Arc<UnboundedInner<T>>>,
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// `Pin<&mut UnboundedReceiver<T>>` is never projected to `Pin<&mut T>`
|
|
151
|
+
impl<T> Unpin for UnboundedReceiver<T> {}
|
|
152
|
+
|
|
153
|
+
/// The error type for [`Sender`s](Sender) used as `Sink`s.
|
|
154
|
+
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
155
|
+
pub struct SendError {
|
|
156
|
+
kind: SendErrorKind,
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/// The error type returned from [`try_send`](Sender::try_send).
|
|
160
|
+
#[derive(Clone, PartialEq, Eq)]
|
|
161
|
+
pub struct TrySendError<T> {
|
|
162
|
+
err: SendError,
|
|
163
|
+
val: T,
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
#[derive(Clone, Debug, PartialEq, Eq)]
|
|
167
|
+
enum SendErrorKind {
|
|
168
|
+
Full,
|
|
169
|
+
Disconnected,
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/// Error returned by [`Receiver::try_recv`] or [`UnboundedReceiver::try_recv`].
|
|
173
|
+
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
|
|
174
|
+
pub enum TryRecvError {
|
|
175
|
+
/// The channel is empty but not closed.
|
|
176
|
+
Empty,
|
|
177
|
+
|
|
178
|
+
/// The channel is empty and closed.
|
|
179
|
+
Closed,
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/// Error returned by the future returned by [`Receiver::recv()`] or [`UnboundedReceiver::recv()`].
|
|
183
|
+
/// Received when the channel is empty and closed.
|
|
184
|
+
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
|
|
185
|
+
pub struct RecvError;
|
|
186
|
+
|
|
187
|
+
/// Future returned by [`Receiver::recv()`] or [`UnboundedReceiver::recv()`].
|
|
188
|
+
#[derive(Debug)]
|
|
189
|
+
#[must_use = "futures do nothing unless you `.await` or poll them"]
|
|
190
|
+
pub struct Recv<'a, St: ?Sized> {
|
|
191
|
+
stream: &'a mut St,
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
impl fmt::Display for SendError {
|
|
195
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
196
|
+
if self.is_full() {
|
|
197
|
+
write!(f, "send failed because channel is full")
|
|
198
|
+
} else {
|
|
199
|
+
write!(f, "send failed because receiver is gone")
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
impl std::error::Error for SendError {}
|
|
205
|
+
|
|
206
|
+
impl fmt::Display for RecvError {
|
|
207
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
208
|
+
write!(f, "receive failed because channel is empty and closed")
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
impl std::error::Error for RecvError {}
|
|
213
|
+
|
|
214
|
+
impl SendError {
|
|
215
|
+
/// Returns `true` if this error is a result of the channel being full.
|
|
216
|
+
pub fn is_full(&self) -> bool {
|
|
217
|
+
match self.kind {
|
|
218
|
+
SendErrorKind::Full => true,
|
|
219
|
+
_ => false,
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/// Returns `true` if this error is a result of the receiver being dropped.
|
|
224
|
+
pub fn is_disconnected(&self) -> bool {
|
|
225
|
+
match self.kind {
|
|
226
|
+
SendErrorKind::Disconnected => true,
|
|
227
|
+
_ => false,
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
impl TryRecvError {
|
|
233
|
+
/// Returns `true` if the channel is empty but not closed.
|
|
234
|
+
pub fn is_empty(&self) -> bool {
|
|
235
|
+
matches!(self, TryRecvError::Empty)
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/// Returns `true` if the channel is empty and closed.
|
|
239
|
+
pub fn is_closed(&self) -> bool {
|
|
240
|
+
matches!(self, TryRecvError::Closed)
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
impl<T> fmt::Debug for TrySendError<T> {
|
|
245
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
246
|
+
f.debug_struct("TrySendError").field("kind", &self.err.kind).finish()
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
impl<T> fmt::Display for TrySendError<T> {
|
|
251
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
252
|
+
if self.is_full() {
|
|
253
|
+
write!(f, "send failed because channel is full")
|
|
254
|
+
} else {
|
|
255
|
+
write!(f, "send failed because receiver is gone")
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
impl<T: core::any::Any> std::error::Error for TrySendError<T> {}
|
|
261
|
+
|
|
262
|
+
impl<T> TrySendError<T> {
|
|
263
|
+
/// Returns `true` if this error is a result of the channel being full.
|
|
264
|
+
pub fn is_full(&self) -> bool {
|
|
265
|
+
self.err.is_full()
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/// Returns `true` if this error is a result of the receiver being dropped.
|
|
269
|
+
pub fn is_disconnected(&self) -> bool {
|
|
270
|
+
self.err.is_disconnected()
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/// Returns the message that was attempted to be sent but failed.
|
|
274
|
+
pub fn into_inner(self) -> T {
|
|
275
|
+
self.val
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/// Drops the message and converts into a `SendError`.
|
|
279
|
+
pub fn into_send_error(self) -> SendError {
|
|
280
|
+
self.err
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
impl fmt::Display for TryRecvError {
|
|
285
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
286
|
+
match self {
|
|
287
|
+
TryRecvError::Empty => write!(f, "receive failed because channel is empty"),
|
|
288
|
+
TryRecvError::Closed => write!(f, "receive failed because channel is closed"),
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
impl std::error::Error for TryRecvError {}
|
|
294
|
+
|
|
295
|
+
struct UnboundedInner<T> {
|
|
296
|
+
// Internal channel state. Consists of the number of messages stored in the
|
|
297
|
+
// channel as well as a flag signalling that the channel is closed.
|
|
298
|
+
state: AtomicUsize,
|
|
299
|
+
|
|
300
|
+
// Atomic, FIFO queue used to send messages to the receiver
|
|
301
|
+
message_queue: Queue<T>,
|
|
302
|
+
|
|
303
|
+
// Number of senders in existence
|
|
304
|
+
num_senders: AtomicUsize,
|
|
305
|
+
|
|
306
|
+
// Handle to the receiver's task.
|
|
307
|
+
recv_task: AtomicWaker,
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
struct BoundedInner<T> {
|
|
311
|
+
// Max buffer size of the channel. If `None` then the channel is unbounded.
|
|
312
|
+
buffer: usize,
|
|
313
|
+
|
|
314
|
+
// Internal channel state. Consists of the number of messages stored in the
|
|
315
|
+
// channel as well as a flag signalling that the channel is closed.
|
|
316
|
+
state: AtomicUsize,
|
|
317
|
+
|
|
318
|
+
// Atomic, FIFO queue used to send messages to the receiver
|
|
319
|
+
message_queue: Queue<T>,
|
|
320
|
+
|
|
321
|
+
// Atomic, FIFO queue used to send parked task handles to the receiver.
|
|
322
|
+
parked_queue: Queue<Arc<Mutex<SenderTask>>>,
|
|
323
|
+
|
|
324
|
+
// Number of senders in existence
|
|
325
|
+
num_senders: AtomicUsize,
|
|
326
|
+
|
|
327
|
+
// Handle to the receiver's task.
|
|
328
|
+
recv_task: AtomicWaker,
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// Struct representation of `Inner::state`.
|
|
332
|
+
#[derive(Clone, Copy)]
|
|
333
|
+
struct State {
|
|
334
|
+
// `true` when the channel is open
|
|
335
|
+
is_open: bool,
|
|
336
|
+
|
|
337
|
+
// Number of messages in the channel
|
|
338
|
+
num_messages: usize,
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// The `is_open` flag is stored in the left-most bit of `Inner::state`
|
|
342
|
+
const OPEN_MASK: usize = usize::MAX - (usize::MAX >> 1);
|
|
343
|
+
|
|
344
|
+
// When a new channel is created, it is created in the open state with no
|
|
345
|
+
// pending messages.
|
|
346
|
+
const INIT_STATE: usize = OPEN_MASK;
|
|
347
|
+
|
|
348
|
+
// The maximum number of messages that a channel can track is `usize::MAX >> 1`
|
|
349
|
+
const MAX_CAPACITY: usize = !(OPEN_MASK);
|
|
350
|
+
|
|
351
|
+
// The maximum requested buffer size must be less than the maximum capacity of
|
|
352
|
+
// a channel. This is because each sender gets a guaranteed slot.
|
|
353
|
+
const MAX_BUFFER: usize = MAX_CAPACITY >> 1;
|
|
354
|
+
|
|
355
|
+
// Sent to the consumer to wake up blocked producers
|
|
356
|
+
struct SenderTask {
|
|
357
|
+
task: Option<Waker>,
|
|
358
|
+
is_parked: bool,
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
impl SenderTask {
|
|
362
|
+
fn new() -> Self {
|
|
363
|
+
Self { task: None, is_parked: false }
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
fn notify(&mut self) {
|
|
367
|
+
self.is_parked = false;
|
|
368
|
+
|
|
369
|
+
if let Some(task) = self.task.take() {
|
|
370
|
+
task.wake();
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/// Creates a bounded mpsc channel for communicating between asynchronous tasks.
|
|
376
|
+
///
|
|
377
|
+
/// Being bounded, this channel provides backpressure to ensure that the sender
|
|
378
|
+
/// outpaces the receiver by only a limited amount. The channel's capacity is
|
|
379
|
+
/// equal to `buffer + num-senders`. In other words, each sender gets a
|
|
380
|
+
/// guaranteed slot in the channel capacity, and on top of that there are
|
|
381
|
+
/// `buffer` "first come, first serve" slots available to all senders.
|
|
382
|
+
///
|
|
383
|
+
/// The [`Receiver`] returned implements the [`Stream`] trait, while [`Sender`]
|
|
384
|
+
/// implements `Sink`.
|
|
385
|
+
pub fn channel<T>(buffer: usize) -> (Sender<T>, Receiver<T>) {
|
|
386
|
+
// Check that the requested buffer size does not exceed the maximum buffer
|
|
387
|
+
// size permitted by the system.
|
|
388
|
+
assert!(buffer < MAX_BUFFER, "requested buffer size too large");
|
|
389
|
+
|
|
390
|
+
let inner = Arc::new(BoundedInner {
|
|
391
|
+
buffer,
|
|
392
|
+
state: AtomicUsize::new(INIT_STATE),
|
|
393
|
+
message_queue: Queue::new(),
|
|
394
|
+
parked_queue: Queue::new(),
|
|
395
|
+
num_senders: AtomicUsize::new(1),
|
|
396
|
+
recv_task: AtomicWaker::new(),
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
let tx = BoundedSenderInner {
|
|
400
|
+
inner: inner.clone(),
|
|
401
|
+
sender_task: Arc::new(Mutex::new(SenderTask::new())),
|
|
402
|
+
maybe_parked: false,
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
let rx = Receiver { inner: Some(inner) };
|
|
406
|
+
|
|
407
|
+
(Sender(Some(tx)), rx)
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
/// Creates an unbounded mpsc channel for communicating between asynchronous
|
|
411
|
+
/// tasks.
|
|
412
|
+
///
|
|
413
|
+
/// A `send` on this channel will always succeed as long as the receive half has
|
|
414
|
+
/// not been closed. If the receiver falls behind, messages will be arbitrarily
|
|
415
|
+
/// buffered.
|
|
416
|
+
///
|
|
417
|
+
/// **Note** that the amount of available system memory is an implicit bound to
|
|
418
|
+
/// the channel. Using an `unbounded` channel has the ability of causing the
|
|
419
|
+
/// process to run out of memory. In this case, the process will be aborted.
|
|
420
|
+
pub fn unbounded<T>() -> (UnboundedSender<T>, UnboundedReceiver<T>) {
|
|
421
|
+
let inner = Arc::new(UnboundedInner {
|
|
422
|
+
state: AtomicUsize::new(INIT_STATE),
|
|
423
|
+
message_queue: Queue::new(),
|
|
424
|
+
num_senders: AtomicUsize::new(1),
|
|
425
|
+
recv_task: AtomicWaker::new(),
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
let tx = UnboundedSenderInner { inner: inner.clone() };
|
|
429
|
+
|
|
430
|
+
let rx = UnboundedReceiver { inner: Some(inner) };
|
|
431
|
+
|
|
432
|
+
(UnboundedSender(Some(tx)), rx)
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/*
|
|
436
|
+
*
|
|
437
|
+
* ===== impl Sender =====
|
|
438
|
+
*
|
|
439
|
+
*/
|
|
440
|
+
|
|
441
|
+
impl<T> UnboundedSenderInner<T> {
|
|
442
|
+
fn poll_ready_nb(&self) -> Poll<Result<(), SendError>> {
|
|
443
|
+
let state = decode_state(self.inner.state.load(SeqCst));
|
|
444
|
+
if state.is_open {
|
|
445
|
+
Poll::Ready(Ok(()))
|
|
446
|
+
} else {
|
|
447
|
+
Poll::Ready(Err(SendError { kind: SendErrorKind::Disconnected }))
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
// Push message to the queue and signal to the receiver
|
|
452
|
+
fn queue_push_and_signal(&self, msg: T) {
|
|
453
|
+
// Push the message onto the message queue
|
|
454
|
+
self.inner.message_queue.push(msg);
|
|
455
|
+
|
|
456
|
+
// Signal to the receiver that a message has been enqueued. If the
|
|
457
|
+
// receiver is parked, this will unpark the task.
|
|
458
|
+
self.inner.recv_task.wake();
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// Increment the number of queued messages. Returns the resulting number.
|
|
462
|
+
fn inc_num_messages(&self) -> Option<usize> {
|
|
463
|
+
let mut curr = self.inner.state.load(SeqCst);
|
|
464
|
+
|
|
465
|
+
loop {
|
|
466
|
+
let mut state = decode_state(curr);
|
|
467
|
+
|
|
468
|
+
// The receiver end closed the channel.
|
|
469
|
+
if !state.is_open {
|
|
470
|
+
return None;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// This probably is never hit? Odds are the process will run out of
|
|
474
|
+
// memory first. It may be worth to return something else in this
|
|
475
|
+
// case?
|
|
476
|
+
assert!(
|
|
477
|
+
state.num_messages < MAX_CAPACITY,
|
|
478
|
+
"buffer space \
|
|
479
|
+
exhausted; sending this messages would overflow the state"
|
|
480
|
+
);
|
|
481
|
+
|
|
482
|
+
state.num_messages += 1;
|
|
483
|
+
|
|
484
|
+
let next = encode_state(&state);
|
|
485
|
+
match self.inner.state.compare_exchange(curr, next, SeqCst, SeqCst) {
|
|
486
|
+
Ok(_) => return Some(state.num_messages),
|
|
487
|
+
Err(actual) => curr = actual,
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/// Returns whether the senders send to the same receiver.
|
|
493
|
+
fn same_receiver(&self, other: &Self) -> bool {
|
|
494
|
+
Arc::ptr_eq(&self.inner, &other.inner)
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/// Returns whether the sender send to this receiver.
|
|
498
|
+
fn is_connected_to(&self, inner: &Arc<UnboundedInner<T>>) -> bool {
|
|
499
|
+
Arc::ptr_eq(&self.inner, inner)
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/// Returns pointer to the Arc containing sender
|
|
503
|
+
///
|
|
504
|
+
/// The returned pointer is not referenced and should be only used for hashing!
|
|
505
|
+
fn ptr(&self) -> *const UnboundedInner<T> {
|
|
506
|
+
&*self.inner
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/// Returns whether this channel is closed without needing a context.
|
|
510
|
+
fn is_closed(&self) -> bool {
|
|
511
|
+
!decode_state(self.inner.state.load(SeqCst)).is_open
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/// Closes this channel from the sender side, preventing any new messages.
|
|
515
|
+
fn close_channel(&self) {
|
|
516
|
+
// There's no need to park this sender, its dropping,
|
|
517
|
+
// and we don't want to check for capacity, so skip
|
|
518
|
+
// that stuff from `do_send`.
|
|
519
|
+
|
|
520
|
+
self.inner.set_closed();
|
|
521
|
+
self.inner.recv_task.wake();
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
impl<T> BoundedSenderInner<T> {
|
|
526
|
+
/// Attempts to send a message on this `Sender`, returning the message
|
|
527
|
+
/// if there was an error.
|
|
528
|
+
fn try_send(&mut self, msg: T) -> Result<(), TrySendError<T>> {
|
|
529
|
+
// If the sender is currently blocked, reject the message
|
|
530
|
+
if !self.poll_unparked(None).is_ready() {
|
|
531
|
+
return Err(TrySendError { err: SendError { kind: SendErrorKind::Full }, val: msg });
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
// The channel has capacity to accept the message, so send it
|
|
535
|
+
self.do_send_b(msg)
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// Do the send without failing.
|
|
539
|
+
// Can be called only by bounded sender.
|
|
540
|
+
fn do_send_b(&mut self, msg: T) -> Result<(), TrySendError<T>> {
|
|
541
|
+
// Anyone calling do_send *should* make sure there is room first,
|
|
542
|
+
// but assert here for tests as a sanity check.
|
|
543
|
+
debug_assert!(self.poll_unparked(None).is_ready());
|
|
544
|
+
|
|
545
|
+
// First, increment the number of messages contained by the channel.
|
|
546
|
+
// This operation will also atomically determine if the sender task
|
|
547
|
+
// should be parked.
|
|
548
|
+
//
|
|
549
|
+
// `None` is returned in the case that the channel has been closed by the
|
|
550
|
+
// receiver. This happens when `Receiver::close` is called or the
|
|
551
|
+
// receiver is dropped.
|
|
552
|
+
let park_self = match self.inc_num_messages() {
|
|
553
|
+
Some(num_messages) => {
|
|
554
|
+
// Block if the current number of pending messages has exceeded
|
|
555
|
+
// the configured buffer size
|
|
556
|
+
num_messages > self.inner.buffer
|
|
557
|
+
}
|
|
558
|
+
None => {
|
|
559
|
+
return Err(TrySendError {
|
|
560
|
+
err: SendError { kind: SendErrorKind::Disconnected },
|
|
561
|
+
val: msg,
|
|
562
|
+
})
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
|
|
566
|
+
// If the channel has reached capacity, then the sender task needs to
|
|
567
|
+
// be parked. This will send the task handle on the parked task queue.
|
|
568
|
+
//
|
|
569
|
+
// However, when `do_send` is called while dropping the `Sender`,
|
|
570
|
+
// `task::current()` can't be called safely. In this case, in order to
|
|
571
|
+
// maintain internal consistency, a blank message is pushed onto the
|
|
572
|
+
// parked task queue.
|
|
573
|
+
if park_self {
|
|
574
|
+
self.park();
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
self.queue_push_and_signal(msg);
|
|
578
|
+
|
|
579
|
+
Ok(())
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
// Push message to the queue and signal to the receiver
|
|
583
|
+
fn queue_push_and_signal(&self, msg: T) {
|
|
584
|
+
// Push the message onto the message queue
|
|
585
|
+
self.inner.message_queue.push(msg);
|
|
586
|
+
|
|
587
|
+
// Signal to the receiver that a message has been enqueued. If the
|
|
588
|
+
// receiver is parked, this will unpark the task.
|
|
589
|
+
self.inner.recv_task.wake();
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// Increment the number of queued messages. Returns the resulting number.
|
|
593
|
+
fn inc_num_messages(&self) -> Option<usize> {
|
|
594
|
+
let mut curr = self.inner.state.load(SeqCst);
|
|
595
|
+
|
|
596
|
+
loop {
|
|
597
|
+
let mut state = decode_state(curr);
|
|
598
|
+
|
|
599
|
+
// The receiver end closed the channel.
|
|
600
|
+
if !state.is_open {
|
|
601
|
+
return None;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
// This probably is never hit? Odds are the process will run out of
|
|
605
|
+
// memory first. It may be worth to return something else in this
|
|
606
|
+
// case?
|
|
607
|
+
assert!(
|
|
608
|
+
state.num_messages < MAX_CAPACITY,
|
|
609
|
+
"buffer space \
|
|
610
|
+
exhausted; sending this messages would overflow the state"
|
|
611
|
+
);
|
|
612
|
+
|
|
613
|
+
state.num_messages += 1;
|
|
614
|
+
|
|
615
|
+
let next = encode_state(&state);
|
|
616
|
+
match self.inner.state.compare_exchange(curr, next, SeqCst, SeqCst) {
|
|
617
|
+
Ok(_) => return Some(state.num_messages),
|
|
618
|
+
Err(actual) => curr = actual,
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
fn park(&mut self) {
|
|
624
|
+
{
|
|
625
|
+
let mut sender = self.sender_task.lock().unwrap();
|
|
626
|
+
sender.task = None;
|
|
627
|
+
sender.is_parked = true;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
// Send handle over queue
|
|
631
|
+
let t = self.sender_task.clone();
|
|
632
|
+
self.inner.parked_queue.push(t);
|
|
633
|
+
|
|
634
|
+
// Check to make sure we weren't closed after we sent our task on the
|
|
635
|
+
// queue
|
|
636
|
+
let state = decode_state(self.inner.state.load(SeqCst));
|
|
637
|
+
self.maybe_parked = state.is_open;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/// Polls the channel to determine if there is guaranteed capacity to send
|
|
641
|
+
/// at least one item without waiting.
|
|
642
|
+
///
|
|
643
|
+
/// # Return value
|
|
644
|
+
///
|
|
645
|
+
/// This method returns:
|
|
646
|
+
///
|
|
647
|
+
/// - `Poll::Ready(Ok(_))` if there is sufficient capacity;
|
|
648
|
+
/// - `Poll::Pending` if the channel may not have
|
|
649
|
+
/// capacity, in which case the current task is queued to be notified once
|
|
650
|
+
/// capacity is available;
|
|
651
|
+
/// - `Poll::Ready(Err(SendError))` if the receiver has been dropped.
|
|
652
|
+
fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), SendError>> {
|
|
653
|
+
let state = decode_state(self.inner.state.load(SeqCst));
|
|
654
|
+
if !state.is_open {
|
|
655
|
+
return Poll::Ready(Err(SendError { kind: SendErrorKind::Disconnected }));
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
self.poll_unparked(Some(cx)).map(Ok)
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/// Returns whether the senders send to the same receiver.
|
|
662
|
+
fn same_receiver(&self, other: &Self) -> bool {
|
|
663
|
+
Arc::ptr_eq(&self.inner, &other.inner)
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
/// Returns whether the sender send to this receiver.
|
|
667
|
+
fn is_connected_to(&self, receiver: &Arc<BoundedInner<T>>) -> bool {
|
|
668
|
+
Arc::ptr_eq(&self.inner, receiver)
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
/// Returns pointer to the Arc containing sender
|
|
672
|
+
///
|
|
673
|
+
/// The returned pointer is not referenced and should be only used for hashing!
|
|
674
|
+
fn ptr(&self) -> *const BoundedInner<T> {
|
|
675
|
+
&*self.inner
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
/// Returns whether this channel is closed without needing a context.
|
|
679
|
+
fn is_closed(&self) -> bool {
|
|
680
|
+
!decode_state(self.inner.state.load(SeqCst)).is_open
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
/// Closes this channel from the sender side, preventing any new messages.
|
|
684
|
+
fn close_channel(&self) {
|
|
685
|
+
// There's no need to park this sender, its dropping,
|
|
686
|
+
// and we don't want to check for capacity, so skip
|
|
687
|
+
// that stuff from `do_send`.
|
|
688
|
+
|
|
689
|
+
self.inner.set_closed();
|
|
690
|
+
self.inner.recv_task.wake();
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
fn poll_unparked(&mut self, cx: Option<&mut Context<'_>>) -> Poll<()> {
|
|
694
|
+
// First check the `maybe_parked` variable. This avoids acquiring the
|
|
695
|
+
// lock in most cases
|
|
696
|
+
if self.maybe_parked {
|
|
697
|
+
// Get a lock on the task handle
|
|
698
|
+
let mut task = self.sender_task.lock().unwrap();
|
|
699
|
+
|
|
700
|
+
if !task.is_parked {
|
|
701
|
+
self.maybe_parked = false;
|
|
702
|
+
return Poll::Ready(());
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
// At this point, an unpark request is pending, so there will be an
|
|
706
|
+
// unpark sometime in the future. We just need to make sure that
|
|
707
|
+
// the correct task will be notified.
|
|
708
|
+
//
|
|
709
|
+
// Update the task in case the `Sender` has been moved to another
|
|
710
|
+
// task
|
|
711
|
+
task.task = cx.map(|cx| cx.waker().clone());
|
|
712
|
+
|
|
713
|
+
Poll::Pending
|
|
714
|
+
} else {
|
|
715
|
+
Poll::Ready(())
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
impl<T> Sender<T> {
|
|
721
|
+
/// Attempts to send a message on this `Sender`, returning the message
|
|
722
|
+
/// if there was an error.
|
|
723
|
+
pub fn try_send(&mut self, msg: T) -> Result<(), TrySendError<T>> {
|
|
724
|
+
if let Some(inner) = &mut self.0 {
|
|
725
|
+
inner.try_send(msg)
|
|
726
|
+
} else {
|
|
727
|
+
Err(TrySendError { err: SendError { kind: SendErrorKind::Disconnected }, val: msg })
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/// Send a message on the channel.
|
|
732
|
+
///
|
|
733
|
+
/// This function should only be called after
|
|
734
|
+
/// [`poll_ready`](Sender::poll_ready) has reported that the channel is
|
|
735
|
+
/// ready to receive a message.
|
|
736
|
+
pub fn start_send(&mut self, msg: T) -> Result<(), SendError> {
|
|
737
|
+
self.try_send(msg).map_err(|e| e.err)
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/// Polls the channel to determine if there is guaranteed capacity to send
|
|
741
|
+
/// at least one item without waiting.
|
|
742
|
+
///
|
|
743
|
+
/// # Return value
|
|
744
|
+
///
|
|
745
|
+
/// This method returns:
|
|
746
|
+
///
|
|
747
|
+
/// - `Poll::Ready(Ok(_))` if there is sufficient capacity;
|
|
748
|
+
/// - `Poll::Pending` if the channel may not have
|
|
749
|
+
/// capacity, in which case the current task is queued to be notified once
|
|
750
|
+
/// capacity is available;
|
|
751
|
+
/// - `Poll::Ready(Err(SendError))` if the receiver has been dropped.
|
|
752
|
+
pub fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), SendError>> {
|
|
753
|
+
let inner = self.0.as_mut().ok_or(SendError { kind: SendErrorKind::Disconnected })?;
|
|
754
|
+
inner.poll_ready(cx)
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
/// Returns whether this channel is closed without needing a context.
|
|
758
|
+
pub fn is_closed(&self) -> bool {
|
|
759
|
+
self.0.as_ref().map(BoundedSenderInner::is_closed).unwrap_or(true)
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/// Closes this channel from the sender side, preventing any new messages.
|
|
763
|
+
pub fn close_channel(&mut self) {
|
|
764
|
+
if let Some(inner) = &mut self.0 {
|
|
765
|
+
inner.close_channel();
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
/// Disconnects this sender from the channel, closing it if there are no more senders left.
|
|
770
|
+
pub fn disconnect(&mut self) {
|
|
771
|
+
self.0 = None;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
/// Returns whether the senders send to the same receiver.
|
|
775
|
+
pub fn same_receiver(&self, other: &Self) -> bool {
|
|
776
|
+
match (&self.0, &other.0) {
|
|
777
|
+
(Some(inner), Some(other)) => inner.same_receiver(other),
|
|
778
|
+
_ => false,
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
/// Returns whether the sender send to this receiver.
|
|
783
|
+
pub fn is_connected_to(&self, receiver: &Receiver<T>) -> bool {
|
|
784
|
+
match (&self.0, &receiver.inner) {
|
|
785
|
+
(Some(inner), Some(receiver)) => inner.is_connected_to(receiver),
|
|
786
|
+
_ => false,
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/// Hashes the receiver into the provided hasher
|
|
791
|
+
pub fn hash_receiver<H>(&self, hasher: &mut H)
|
|
792
|
+
where
|
|
793
|
+
H: std::hash::Hasher,
|
|
794
|
+
{
|
|
795
|
+
use std::hash::Hash;
|
|
796
|
+
|
|
797
|
+
let ptr = self.0.as_ref().map(|inner| inner.ptr());
|
|
798
|
+
ptr.hash(hasher);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
impl<T> UnboundedSender<T> {
|
|
803
|
+
/// Check if the channel is ready to receive a message.
|
|
804
|
+
pub fn poll_ready(&self, _: &mut Context<'_>) -> Poll<Result<(), SendError>> {
|
|
805
|
+
let inner = self.0.as_ref().ok_or(SendError { kind: SendErrorKind::Disconnected })?;
|
|
806
|
+
inner.poll_ready_nb()
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
/// Returns whether this channel is closed without needing a context.
|
|
810
|
+
pub fn is_closed(&self) -> bool {
|
|
811
|
+
self.0.as_ref().map(UnboundedSenderInner::is_closed).unwrap_or(true)
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
/// Closes this channel from the sender side, preventing any new messages.
|
|
815
|
+
pub fn close_channel(&self) {
|
|
816
|
+
if let Some(inner) = &self.0 {
|
|
817
|
+
inner.close_channel();
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/// Disconnects this sender from the channel, closing it if there are no more senders left.
|
|
822
|
+
pub fn disconnect(&mut self) {
|
|
823
|
+
self.0 = None;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
// Do the send without parking current task.
|
|
827
|
+
fn do_send_nb(&self, msg: T) -> Result<(), TrySendError<T>> {
|
|
828
|
+
if let Some(inner) = &self.0 {
|
|
829
|
+
if inner.inc_num_messages().is_some() {
|
|
830
|
+
inner.queue_push_and_signal(msg);
|
|
831
|
+
return Ok(());
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
Err(TrySendError { err: SendError { kind: SendErrorKind::Disconnected }, val: msg })
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
/// Send a message on the channel.
|
|
839
|
+
///
|
|
840
|
+
/// This method should only be called after `poll_ready` has been used to
|
|
841
|
+
/// verify that the channel is ready to receive a message.
|
|
842
|
+
pub fn start_send(&mut self, msg: T) -> Result<(), SendError> {
|
|
843
|
+
self.do_send_nb(msg).map_err(|e| e.err)
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/// Sends a message along this channel.
|
|
847
|
+
///
|
|
848
|
+
/// This is an unbounded sender, so this function differs from `Sink::send`
|
|
849
|
+
/// by ensuring the return type reflects that the channel is always ready to
|
|
850
|
+
/// receive messages.
|
|
851
|
+
pub fn unbounded_send(&self, msg: T) -> Result<(), TrySendError<T>> {
|
|
852
|
+
self.do_send_nb(msg)
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/// Returns whether the senders send to the same receiver.
|
|
856
|
+
pub fn same_receiver(&self, other: &Self) -> bool {
|
|
857
|
+
match (&self.0, &other.0) {
|
|
858
|
+
(Some(inner), Some(other)) => inner.same_receiver(other),
|
|
859
|
+
_ => false,
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
/// Returns whether the sender send to this receiver.
|
|
864
|
+
pub fn is_connected_to(&self, receiver: &UnboundedReceiver<T>) -> bool {
|
|
865
|
+
match (&self.0, &receiver.inner) {
|
|
866
|
+
(Some(inner), Some(receiver)) => inner.is_connected_to(receiver),
|
|
867
|
+
_ => false,
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/// Hashes the receiver into the provided hasher
|
|
872
|
+
pub fn hash_receiver<H>(&self, hasher: &mut H)
|
|
873
|
+
where
|
|
874
|
+
H: std::hash::Hasher,
|
|
875
|
+
{
|
|
876
|
+
use std::hash::Hash;
|
|
877
|
+
|
|
878
|
+
let ptr = self.0.as_ref().map(|inner| inner.ptr());
|
|
879
|
+
ptr.hash(hasher);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
/// Return the number of messages in the queue or 0 if channel is disconnected.
|
|
883
|
+
pub fn len(&self) -> usize {
|
|
884
|
+
if let Some(sender) = &self.0 {
|
|
885
|
+
decode_state(sender.inner.state.load(SeqCst)).num_messages
|
|
886
|
+
} else {
|
|
887
|
+
0
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
/// Return false is channel has no queued messages, true otherwise.
|
|
892
|
+
pub fn is_empty(&self) -> bool {
|
|
893
|
+
self.len() == 0
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
impl<T> Clone for Sender<T> {
|
|
898
|
+
fn clone(&self) -> Self {
|
|
899
|
+
Self(self.0.clone())
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
impl<T> Clone for UnboundedSender<T> {
|
|
904
|
+
fn clone(&self) -> Self {
|
|
905
|
+
Self(self.0.clone())
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
impl<T> Clone for UnboundedSenderInner<T> {
|
|
910
|
+
fn clone(&self) -> Self {
|
|
911
|
+
// Since this atomic op isn't actually guarding any memory and we don't
|
|
912
|
+
// care about any orderings besides the ordering on the single atomic
|
|
913
|
+
// variable, a relaxed ordering is acceptable.
|
|
914
|
+
let mut curr = self.inner.num_senders.load(SeqCst);
|
|
915
|
+
|
|
916
|
+
loop {
|
|
917
|
+
// If the maximum number of senders has been reached, then fail
|
|
918
|
+
if curr == MAX_BUFFER {
|
|
919
|
+
panic!("cannot clone `Sender` -- too many outstanding senders");
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
debug_assert!(curr < MAX_BUFFER);
|
|
923
|
+
|
|
924
|
+
let next = curr + 1;
|
|
925
|
+
match self.inner.num_senders.compare_exchange(curr, next, SeqCst, SeqCst) {
|
|
926
|
+
Ok(_) => {
|
|
927
|
+
// The ABA problem doesn't matter here. We only care that the
|
|
928
|
+
// number of senders never exceeds the maximum.
|
|
929
|
+
return Self { inner: self.inner.clone() };
|
|
930
|
+
}
|
|
931
|
+
Err(actual) => curr = actual,
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
impl<T> Clone for BoundedSenderInner<T> {
|
|
938
|
+
fn clone(&self) -> Self {
|
|
939
|
+
// Since this atomic op isn't actually guarding any memory and we don't
|
|
940
|
+
// care about any orderings besides the ordering on the single atomic
|
|
941
|
+
// variable, a relaxed ordering is acceptable.
|
|
942
|
+
let mut curr = self.inner.num_senders.load(SeqCst);
|
|
943
|
+
|
|
944
|
+
loop {
|
|
945
|
+
// If the maximum number of senders has been reached, then fail
|
|
946
|
+
if curr == self.inner.max_senders() {
|
|
947
|
+
panic!("cannot clone `Sender` -- too many outstanding senders");
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
debug_assert!(curr < self.inner.max_senders());
|
|
951
|
+
|
|
952
|
+
let next = curr + 1;
|
|
953
|
+
match self.inner.num_senders.compare_exchange(curr, next, SeqCst, SeqCst) {
|
|
954
|
+
Ok(_) => {
|
|
955
|
+
// The ABA problem doesn't matter here. We only care that the
|
|
956
|
+
// number of senders never exceeds the maximum.
|
|
957
|
+
return Self {
|
|
958
|
+
inner: self.inner.clone(),
|
|
959
|
+
sender_task: Arc::new(Mutex::new(SenderTask::new())),
|
|
960
|
+
maybe_parked: false,
|
|
961
|
+
};
|
|
962
|
+
}
|
|
963
|
+
Err(actual) => curr = actual,
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
impl<T> Drop for UnboundedSenderInner<T> {
|
|
970
|
+
fn drop(&mut self) {
|
|
971
|
+
// Ordering between variables don't matter here
|
|
972
|
+
let prev = self.inner.num_senders.fetch_sub(1, SeqCst);
|
|
973
|
+
|
|
974
|
+
if prev == 1 {
|
|
975
|
+
self.close_channel();
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
impl<T> Drop for BoundedSenderInner<T> {
|
|
981
|
+
fn drop(&mut self) {
|
|
982
|
+
// Ordering between variables don't matter here
|
|
983
|
+
let prev = self.inner.num_senders.fetch_sub(1, SeqCst);
|
|
984
|
+
|
|
985
|
+
if prev == 1 {
|
|
986
|
+
self.close_channel();
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
impl<T> fmt::Debug for Sender<T> {
|
|
992
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
993
|
+
f.debug_struct("Sender").field("closed", &self.is_closed()).finish()
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
impl<T> fmt::Debug for UnboundedSender<T> {
|
|
998
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
999
|
+
f.debug_struct("UnboundedSender").field("closed", &self.is_closed()).finish()
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
/*
|
|
1004
|
+
*
|
|
1005
|
+
* ===== impl Receiver =====
|
|
1006
|
+
*
|
|
1007
|
+
*/
|
|
1008
|
+
|
|
1009
|
+
impl<T> Receiver<T> {
|
|
1010
|
+
/// Waits for a message from the channel.
|
|
1011
|
+
/// If the channel is empty and closed, returns [`RecvError`].
|
|
1012
|
+
pub fn recv(&mut self) -> Recv<'_, Self> {
|
|
1013
|
+
Recv::new(self)
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
/// Closes the receiving half of a channel, without dropping it.
|
|
1017
|
+
///
|
|
1018
|
+
/// This prevents any further messages from being sent on the channel while
|
|
1019
|
+
/// still enabling the receiver to drain messages that are buffered.
|
|
1020
|
+
pub fn close(&mut self) {
|
|
1021
|
+
if let Some(inner) = &mut self.inner {
|
|
1022
|
+
inner.set_closed();
|
|
1023
|
+
|
|
1024
|
+
// Wake up any threads waiting as they'll see that we've closed the
|
|
1025
|
+
// channel and will continue on their merry way.
|
|
1026
|
+
while let Some(task) = unsafe { inner.parked_queue.pop_spin() } {
|
|
1027
|
+
task.lock().unwrap().notify();
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
/// Tries to receive the next message without notifying a context if empty.
|
|
1033
|
+
///
|
|
1034
|
+
/// It is not recommended to call this function from inside of a future,
|
|
1035
|
+
/// only when you've otherwise arranged to be notified when the channel is
|
|
1036
|
+
/// no longer empty.
|
|
1037
|
+
///
|
|
1038
|
+
/// This function returns:
|
|
1039
|
+
/// * `Ok(Some(t))` when message is fetched
|
|
1040
|
+
/// * `Ok(None)` when channel is closed and no messages left in the queue
|
|
1041
|
+
/// * `Err(e)` when there are no messages available, but channel is not yet closed
|
|
1042
|
+
#[deprecated(note = "please use `try_recv` instead")]
|
|
1043
|
+
pub fn try_next(&mut self) -> Result<Option<T>, TryRecvError> {
|
|
1044
|
+
match self.next_message() {
|
|
1045
|
+
Poll::Ready(msg) => Ok(msg),
|
|
1046
|
+
Poll::Pending => Err(TryRecvError::Empty),
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/// Tries to receive a message from the channel without blocking.
|
|
1051
|
+
/// If the channel is empty, or empty and closed, this method returns an error.
|
|
1052
|
+
pub fn try_recv(&mut self) -> Result<T, TryRecvError> {
|
|
1053
|
+
match self.next_message() {
|
|
1054
|
+
Poll::Ready(Some(msg)) => Ok(msg),
|
|
1055
|
+
Poll::Ready(None) => Err(TryRecvError::Closed),
|
|
1056
|
+
Poll::Pending => Err(TryRecvError::Empty),
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
fn next_message(&mut self) -> Poll<Option<T>> {
|
|
1061
|
+
let inner = match self.inner.as_mut() {
|
|
1062
|
+
None => return Poll::Ready(None),
|
|
1063
|
+
Some(inner) => inner,
|
|
1064
|
+
};
|
|
1065
|
+
// Pop off a message
|
|
1066
|
+
match unsafe { inner.message_queue.pop_spin() } {
|
|
1067
|
+
Some(msg) => {
|
|
1068
|
+
// If there are any parked task handles in the parked queue,
|
|
1069
|
+
// pop one and unpark it.
|
|
1070
|
+
self.unpark_one();
|
|
1071
|
+
|
|
1072
|
+
// Decrement number of messages
|
|
1073
|
+
self.dec_num_messages();
|
|
1074
|
+
|
|
1075
|
+
Poll::Ready(Some(msg))
|
|
1076
|
+
}
|
|
1077
|
+
None => {
|
|
1078
|
+
let state = decode_state(inner.state.load(SeqCst));
|
|
1079
|
+
if state.is_closed() {
|
|
1080
|
+
// If closed flag is set AND there are no pending messages
|
|
1081
|
+
// it means end of stream
|
|
1082
|
+
self.inner = None;
|
|
1083
|
+
Poll::Ready(None)
|
|
1084
|
+
} else {
|
|
1085
|
+
// If queue is open, we need to return Pending
|
|
1086
|
+
// to be woken up when new messages arrive.
|
|
1087
|
+
// If queue is closed but num_messages is non-zero,
|
|
1088
|
+
// it means that senders updated the state,
|
|
1089
|
+
// but didn't put message to queue yet,
|
|
1090
|
+
// so we need to park until sender unparks the task
|
|
1091
|
+
// after queueing the message.
|
|
1092
|
+
Poll::Pending
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
// Unpark a single task handle if there is one pending in the parked queue
|
|
1099
|
+
fn unpark_one(&mut self) {
|
|
1100
|
+
if let Some(inner) = &mut self.inner {
|
|
1101
|
+
if let Some(task) = unsafe { inner.parked_queue.pop_spin() } {
|
|
1102
|
+
task.lock().unwrap().notify();
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
fn dec_num_messages(&self) {
|
|
1108
|
+
if let Some(inner) = &self.inner {
|
|
1109
|
+
// OPEN_MASK is highest bit, so it's unaffected by subtraction
|
|
1110
|
+
// unless there's underflow, and we know there's no underflow
|
|
1111
|
+
// because number of messages at this point is always > 0.
|
|
1112
|
+
inner.state.fetch_sub(1, SeqCst);
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
// The receiver does not ever take a Pin to the inner T
|
|
1118
|
+
impl<T> Unpin for Receiver<T> {}
|
|
1119
|
+
|
|
1120
|
+
impl<T> FusedStream for Receiver<T> {
|
|
1121
|
+
fn is_terminated(&self) -> bool {
|
|
1122
|
+
self.inner.is_none()
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
impl<T> Stream for Receiver<T> {
|
|
1127
|
+
type Item = T;
|
|
1128
|
+
|
|
1129
|
+
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<T>> {
|
|
1130
|
+
// Try to read a message off of the message queue.
|
|
1131
|
+
match self.next_message() {
|
|
1132
|
+
Poll::Ready(msg) => {
|
|
1133
|
+
if msg.is_none() {
|
|
1134
|
+
self.inner = None;
|
|
1135
|
+
}
|
|
1136
|
+
Poll::Ready(msg)
|
|
1137
|
+
}
|
|
1138
|
+
Poll::Pending => {
|
|
1139
|
+
// There are no messages to read, in this case, park.
|
|
1140
|
+
self.inner.as_ref().unwrap().recv_task.register(cx.waker());
|
|
1141
|
+
// Check queue again after parking to prevent race condition:
|
|
1142
|
+
// a message could be added to the queue after previous `next_message`
|
|
1143
|
+
// before `register` call.
|
|
1144
|
+
self.next_message()
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
fn size_hint(&self) -> (usize, Option<usize>) {
|
|
1150
|
+
if let Some(inner) = &self.inner {
|
|
1151
|
+
decode_state(inner.state.load(SeqCst)).size_hint()
|
|
1152
|
+
} else {
|
|
1153
|
+
(0, Some(0))
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
impl<St: ?Sized + Unpin> Unpin for Recv<'_, St> {}
|
|
1159
|
+
impl<'a, St: ?Sized + Stream + Unpin> Recv<'a, St> {
|
|
1160
|
+
fn new(stream: &'a mut St) -> Self {
|
|
1161
|
+
Self { stream }
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
impl<St: ?Sized + FusedStream + Unpin> FusedFuture for Recv<'_, St> {
|
|
1166
|
+
fn is_terminated(&self) -> bool {
|
|
1167
|
+
self.stream.is_terminated()
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
impl<St: ?Sized + Stream + Unpin> Future for Recv<'_, St> {
|
|
1172
|
+
type Output = Result<St::Item, RecvError>;
|
|
1173
|
+
|
|
1174
|
+
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
|
|
1175
|
+
match Pin::new(&mut self.stream).poll_next(cx) {
|
|
1176
|
+
Poll::Ready(Some(msg)) => Poll::Ready(Ok(msg)),
|
|
1177
|
+
Poll::Ready(None) => Poll::Ready(Err(RecvError)),
|
|
1178
|
+
Poll::Pending => Poll::Pending,
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
impl<T> Drop for Receiver<T> {
|
|
1184
|
+
fn drop(&mut self) {
|
|
1185
|
+
// Drain the channel of all pending messages
|
|
1186
|
+
self.close();
|
|
1187
|
+
if self.inner.is_some() {
|
|
1188
|
+
loop {
|
|
1189
|
+
match self.next_message() {
|
|
1190
|
+
Poll::Ready(Some(_)) => {}
|
|
1191
|
+
Poll::Ready(None) => break,
|
|
1192
|
+
Poll::Pending => {
|
|
1193
|
+
let state = decode_state(self.inner.as_ref().unwrap().state.load(SeqCst));
|
|
1194
|
+
|
|
1195
|
+
// If the channel is closed, then there is no need to park.
|
|
1196
|
+
if state.is_closed() {
|
|
1197
|
+
break;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
// TODO: Spinning isn't ideal, it might be worth
|
|
1201
|
+
// investigating using a condvar or some other strategy
|
|
1202
|
+
// here. That said, if this case is hit, then another thread
|
|
1203
|
+
// is about to push the value into the queue and this isn't
|
|
1204
|
+
// the only spinlock in the impl right now.
|
|
1205
|
+
thread::yield_now();
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
impl<T> fmt::Debug for Receiver<T> {
|
|
1214
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
1215
|
+
let closed = if let Some(ref inner) = self.inner {
|
|
1216
|
+
decode_state(inner.state.load(SeqCst)).is_closed()
|
|
1217
|
+
} else {
|
|
1218
|
+
false
|
|
1219
|
+
};
|
|
1220
|
+
|
|
1221
|
+
f.debug_struct("Receiver").field("closed", &closed).finish()
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
|
|
1225
|
+
impl<T> UnboundedReceiver<T> {
|
|
1226
|
+
/// Waits for a message from the channel.
|
|
1227
|
+
/// If the channel is empty and closed, returns [`RecvError`].
|
|
1228
|
+
pub fn recv(&mut self) -> Recv<'_, Self> {
|
|
1229
|
+
Recv::new(self)
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
/// Closes the receiving half of a channel, without dropping it.
|
|
1233
|
+
///
|
|
1234
|
+
/// This prevents any further messages from being sent on the channel while
|
|
1235
|
+
/// still enabling the receiver to drain messages that are buffered.
|
|
1236
|
+
pub fn close(&mut self) {
|
|
1237
|
+
if let Some(inner) = &mut self.inner {
|
|
1238
|
+
inner.set_closed();
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
|
|
1242
|
+
/// Tries to receive the next message without notifying a context if empty.
|
|
1243
|
+
///
|
|
1244
|
+
/// It is not recommended to call this function from inside of a future,
|
|
1245
|
+
/// only when you've otherwise arranged to be notified when the channel is
|
|
1246
|
+
/// no longer empty.
|
|
1247
|
+
///
|
|
1248
|
+
/// This function returns:
|
|
1249
|
+
/// * `Ok(Some(t))` when message is fetched
|
|
1250
|
+
/// * `Ok(None)` when channel is closed and no messages left in the queue
|
|
1251
|
+
/// * `Err(e)` when there are no messages available, but channel is not yet closed
|
|
1252
|
+
#[deprecated(note = "please use `try_recv` instead")]
|
|
1253
|
+
pub fn try_next(&mut self) -> Result<Option<T>, TryRecvError> {
|
|
1254
|
+
match self.next_message() {
|
|
1255
|
+
Poll::Ready(msg) => Ok(msg),
|
|
1256
|
+
Poll::Pending => Err(TryRecvError::Empty),
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
/// Tries to receive a message from the channel without blocking.
|
|
1261
|
+
/// If the channel is empty, or empty and closed, this method returns an error.
|
|
1262
|
+
pub fn try_recv(&mut self) -> Result<T, TryRecvError> {
|
|
1263
|
+
match self.next_message() {
|
|
1264
|
+
Poll::Ready(Some(msg)) => Ok(msg),
|
|
1265
|
+
Poll::Ready(None) => Err(TryRecvError::Closed),
|
|
1266
|
+
Poll::Pending => Err(TryRecvError::Empty),
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
fn next_message(&mut self) -> Poll<Option<T>> {
|
|
1271
|
+
let inner = match self.inner.as_mut() {
|
|
1272
|
+
None => return Poll::Ready(None),
|
|
1273
|
+
Some(inner) => inner,
|
|
1274
|
+
};
|
|
1275
|
+
// Pop off a message
|
|
1276
|
+
match unsafe { inner.message_queue.pop_spin() } {
|
|
1277
|
+
Some(msg) => {
|
|
1278
|
+
// Decrement number of messages
|
|
1279
|
+
self.dec_num_messages();
|
|
1280
|
+
|
|
1281
|
+
Poll::Ready(Some(msg))
|
|
1282
|
+
}
|
|
1283
|
+
None => {
|
|
1284
|
+
let state = decode_state(inner.state.load(SeqCst));
|
|
1285
|
+
if state.is_closed() {
|
|
1286
|
+
// If closed flag is set AND there are no pending messages
|
|
1287
|
+
// it means end of stream
|
|
1288
|
+
self.inner = None;
|
|
1289
|
+
Poll::Ready(None)
|
|
1290
|
+
} else {
|
|
1291
|
+
// If queue is open, we need to return Pending
|
|
1292
|
+
// to be woken up when new messages arrive.
|
|
1293
|
+
// If queue is closed but num_messages is non-zero,
|
|
1294
|
+
// it means that senders updated the state,
|
|
1295
|
+
// but didn't put message to queue yet,
|
|
1296
|
+
// so we need to park until sender unparks the task
|
|
1297
|
+
// after queueing the message.
|
|
1298
|
+
Poll::Pending
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
fn dec_num_messages(&self) {
|
|
1305
|
+
if let Some(inner) = &self.inner {
|
|
1306
|
+
// OPEN_MASK is highest bit, so it's unaffected by subtraction
|
|
1307
|
+
// unless there's underflow, and we know there's no underflow
|
|
1308
|
+
// because number of messages at this point is always > 0.
|
|
1309
|
+
inner.state.fetch_sub(1, SeqCst);
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
impl<T> FusedStream for UnboundedReceiver<T> {
|
|
1315
|
+
fn is_terminated(&self) -> bool {
|
|
1316
|
+
self.inner.is_none()
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
impl<T> Stream for UnboundedReceiver<T> {
|
|
1321
|
+
type Item = T;
|
|
1322
|
+
|
|
1323
|
+
fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<T>> {
|
|
1324
|
+
// Try to read a message off of the message queue.
|
|
1325
|
+
match self.next_message() {
|
|
1326
|
+
Poll::Ready(msg) => {
|
|
1327
|
+
if msg.is_none() {
|
|
1328
|
+
self.inner = None;
|
|
1329
|
+
}
|
|
1330
|
+
Poll::Ready(msg)
|
|
1331
|
+
}
|
|
1332
|
+
Poll::Pending => {
|
|
1333
|
+
// There are no messages to read, in this case, park.
|
|
1334
|
+
self.inner.as_ref().unwrap().recv_task.register(cx.waker());
|
|
1335
|
+
// Check queue again after parking to prevent race condition:
|
|
1336
|
+
// a message could be added to the queue after previous `next_message`
|
|
1337
|
+
// before `register` call.
|
|
1338
|
+
self.next_message()
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
fn size_hint(&self) -> (usize, Option<usize>) {
|
|
1344
|
+
if let Some(inner) = &self.inner {
|
|
1345
|
+
decode_state(inner.state.load(SeqCst)).size_hint()
|
|
1346
|
+
} else {
|
|
1347
|
+
(0, Some(0))
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1352
|
+
impl<T> Drop for UnboundedReceiver<T> {
|
|
1353
|
+
fn drop(&mut self) {
|
|
1354
|
+
// Drain the channel of all pending messages
|
|
1355
|
+
self.close();
|
|
1356
|
+
if self.inner.is_some() {
|
|
1357
|
+
loop {
|
|
1358
|
+
match self.next_message() {
|
|
1359
|
+
Poll::Ready(Some(_)) => {}
|
|
1360
|
+
Poll::Ready(None) => break,
|
|
1361
|
+
Poll::Pending => {
|
|
1362
|
+
let state = decode_state(self.inner.as_ref().unwrap().state.load(SeqCst));
|
|
1363
|
+
|
|
1364
|
+
// If the channel is closed, then there is no need to park.
|
|
1365
|
+
if state.is_closed() {
|
|
1366
|
+
break;
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
// TODO: Spinning isn't ideal, it might be worth
|
|
1370
|
+
// investigating using a condvar or some other strategy
|
|
1371
|
+
// here. That said, if this case is hit, then another thread
|
|
1372
|
+
// is about to push the value into the queue and this isn't
|
|
1373
|
+
// the only spinlock in the impl right now.
|
|
1374
|
+
thread::yield_now();
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
impl<T> fmt::Debug for UnboundedReceiver<T> {
|
|
1383
|
+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
1384
|
+
let closed = if let Some(ref inner) = self.inner {
|
|
1385
|
+
decode_state(inner.state.load(SeqCst)).is_closed()
|
|
1386
|
+
} else {
|
|
1387
|
+
false
|
|
1388
|
+
};
|
|
1389
|
+
|
|
1390
|
+
f.debug_struct("Receiver").field("closed", &closed).finish()
|
|
1391
|
+
}
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
/*
|
|
1395
|
+
*
|
|
1396
|
+
* ===== impl Inner =====
|
|
1397
|
+
*
|
|
1398
|
+
*/
|
|
1399
|
+
|
|
1400
|
+
impl<T> UnboundedInner<T> {
|
|
1401
|
+
// Clear `open` flag in the state, keep `num_messages` intact.
|
|
1402
|
+
fn set_closed(&self) {
|
|
1403
|
+
let curr = self.state.load(SeqCst);
|
|
1404
|
+
if !decode_state(curr).is_open {
|
|
1405
|
+
return;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
self.state.fetch_and(!OPEN_MASK, SeqCst);
|
|
1409
|
+
}
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
impl<T> BoundedInner<T> {
|
|
1413
|
+
// The return value is such that the total number of messages that can be
|
|
1414
|
+
// enqueued into the channel will never exceed MAX_CAPACITY
|
|
1415
|
+
fn max_senders(&self) -> usize {
|
|
1416
|
+
MAX_CAPACITY - self.buffer
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
// Clear `open` flag in the state, keep `num_messages` intact.
|
|
1420
|
+
fn set_closed(&self) {
|
|
1421
|
+
let curr = self.state.load(SeqCst);
|
|
1422
|
+
if !decode_state(curr).is_open {
|
|
1423
|
+
return;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
self.state.fetch_and(!OPEN_MASK, SeqCst);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
unsafe impl<T: Send> Send for UnboundedInner<T> {}
|
|
1431
|
+
unsafe impl<T: Send> Sync for UnboundedInner<T> {}
|
|
1432
|
+
|
|
1433
|
+
unsafe impl<T: Send> Send for BoundedInner<T> {}
|
|
1434
|
+
unsafe impl<T: Send> Sync for BoundedInner<T> {}
|
|
1435
|
+
|
|
1436
|
+
impl State {
|
|
1437
|
+
fn is_closed(&self) -> bool {
|
|
1438
|
+
!self.is_open && self.num_messages == 0
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
fn size_hint(&self) -> (usize, Option<usize>) {
|
|
1442
|
+
if self.is_open {
|
|
1443
|
+
(self.num_messages, None)
|
|
1444
|
+
} else {
|
|
1445
|
+
(self.num_messages, Some(self.num_messages))
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
/*
|
|
1451
|
+
*
|
|
1452
|
+
* ===== Helpers =====
|
|
1453
|
+
*
|
|
1454
|
+
*/
|
|
1455
|
+
|
|
1456
|
+
fn decode_state(num: usize) -> State {
|
|
1457
|
+
State { is_open: num & OPEN_MASK == OPEN_MASK, num_messages: num & MAX_CAPACITY }
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
fn encode_state(state: &State) -> usize {
|
|
1461
|
+
let mut num = state.num_messages;
|
|
1462
|
+
|
|
1463
|
+
if state.is_open {
|
|
1464
|
+
num |= OPEN_MASK;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
num
|
|
1468
|
+
}
|