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
|
@@ -1,1057 +1,3384 @@
|
|
|
1
1
|
use super::*;
|
|
2
2
|
|
|
3
|
+
/// Overflow handling mode for Temporal assignment operations.
|
|
4
|
+
///
|
|
5
|
+
/// Used by `from()` and `with()` methods on date/time types.
|
|
6
|
+
#[wasm_bindgen]
|
|
7
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
8
|
+
pub enum TemporalOverflow {
|
|
9
|
+
/// Out-of-range values are clamped to the nearest in-range value.
|
|
10
|
+
Constrain = "constrain",
|
|
11
|
+
/// Out-of-range values will cause the function to throw a RangeError.
|
|
12
|
+
Reject = "reject",
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/// Overflow handling mode for Duration operations.
|
|
16
|
+
///
|
|
17
|
+
/// Used by `Duration.from()` and `Duration.with()`.
|
|
18
|
+
#[wasm_bindgen]
|
|
19
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
20
|
+
pub enum DurationOverflow {
|
|
21
|
+
/// Out-of-range values are clamped to the nearest in-range value.
|
|
22
|
+
Constrain = "constrain",
|
|
23
|
+
/// Out-of-range values are resolved by balancing them with the next highest unit.
|
|
24
|
+
Balance = "balance",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/// Disambiguation mode for handling ambiguous times during DST transitions.
|
|
28
|
+
///
|
|
29
|
+
/// Used when converting `PlainDateTime` to `Instant` or `ZonedDateTime`.
|
|
30
|
+
#[wasm_bindgen]
|
|
31
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
32
|
+
pub enum TemporalDisambiguation {
|
|
33
|
+
/// Equivalent to `'earlier'` for backward transitions and `'later'` for forward transitions.
|
|
34
|
+
/// This matches the behavior of legacy `Date` and libraries like moment.js.
|
|
35
|
+
Compatible = "compatible",
|
|
36
|
+
/// The earlier time of two possible times.
|
|
37
|
+
Earlier = "earlier",
|
|
38
|
+
/// The later of two possible times.
|
|
39
|
+
Later = "later",
|
|
40
|
+
/// Throw a RangeError instead of resolving ambiguity.
|
|
41
|
+
Reject = "reject",
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/// Offset disambiguation option for ZonedDateTime parsing and conversion.
|
|
45
|
+
///
|
|
46
|
+
/// Controls how to handle time zone offset changes when parsing or converting dates.
|
|
47
|
+
#[wasm_bindgen]
|
|
48
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
49
|
+
pub enum TemporalOffsetOption {
|
|
50
|
+
/// Always use the offset to calculate the instant.
|
|
51
|
+
Use = "use",
|
|
52
|
+
/// Use the offset if it's valid for the date/time, otherwise use the time zone.
|
|
53
|
+
Prefer = "prefer",
|
|
54
|
+
/// Disregard any provided offset and use the time zone.
|
|
55
|
+
Ignore = "ignore",
|
|
56
|
+
/// Throw a RangeError if the offset is not valid for the time zone.
|
|
57
|
+
Reject = "reject",
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/// Temporal unit for date operations (singular forms).
|
|
61
|
+
#[wasm_bindgen]
|
|
62
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
63
|
+
pub enum TemporalUnit {
|
|
64
|
+
Year = "year",
|
|
65
|
+
Month = "month",
|
|
66
|
+
Week = "week",
|
|
67
|
+
Day = "day",
|
|
68
|
+
Hour = "hour",
|
|
69
|
+
Minute = "minute",
|
|
70
|
+
Second = "second",
|
|
71
|
+
Millisecond = "millisecond",
|
|
72
|
+
Microsecond = "microsecond",
|
|
73
|
+
Nanosecond = "nanosecond",
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/// Temporal unit for date operations (plural forms).
|
|
77
|
+
#[wasm_bindgen]
|
|
78
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
79
|
+
pub enum TemporalPluralUnit {
|
|
80
|
+
Years = "years",
|
|
81
|
+
Months = "months",
|
|
82
|
+
Weeks = "weeks",
|
|
83
|
+
Days = "days",
|
|
84
|
+
Hours = "hours",
|
|
85
|
+
Minutes = "minutes",
|
|
86
|
+
Seconds = "seconds",
|
|
87
|
+
Milliseconds = "milliseconds",
|
|
88
|
+
Microseconds = "microseconds",
|
|
89
|
+
Nanoseconds = "nanoseconds",
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/// Smallest unit option for rounding and difference operations.
|
|
93
|
+
///
|
|
94
|
+
/// Includes both singular and plural forms of all temporal units.
|
|
95
|
+
#[wasm_bindgen]
|
|
96
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
97
|
+
pub enum SmallestUnit {
|
|
98
|
+
Year = "year",
|
|
99
|
+
Years = "years",
|
|
100
|
+
Month = "month",
|
|
101
|
+
Months = "months",
|
|
102
|
+
Week = "week",
|
|
103
|
+
Weeks = "weeks",
|
|
104
|
+
Day = "day",
|
|
105
|
+
Days = "days",
|
|
106
|
+
Hour = "hour",
|
|
107
|
+
Hours = "hours",
|
|
108
|
+
Minute = "minute",
|
|
109
|
+
Minutes = "minutes",
|
|
110
|
+
Second = "second",
|
|
111
|
+
Seconds = "seconds",
|
|
112
|
+
Millisecond = "millisecond",
|
|
113
|
+
Milliseconds = "milliseconds",
|
|
114
|
+
Microsecond = "microsecond",
|
|
115
|
+
Microseconds = "microseconds",
|
|
116
|
+
Nanosecond = "nanosecond",
|
|
117
|
+
Nanoseconds = "nanoseconds",
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/// Largest unit option for difference and duration operations.
|
|
121
|
+
///
|
|
122
|
+
/// Includes 'auto' plus all singular and plural temporal units.
|
|
123
|
+
#[wasm_bindgen]
|
|
124
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
125
|
+
pub enum LargestUnit {
|
|
126
|
+
/// Automatically determine the largest unit based on context.
|
|
127
|
+
Auto = "auto",
|
|
128
|
+
Year = "year",
|
|
129
|
+
Years = "years",
|
|
130
|
+
Month = "month",
|
|
131
|
+
Months = "months",
|
|
132
|
+
Week = "week",
|
|
133
|
+
Weeks = "weeks",
|
|
134
|
+
Day = "day",
|
|
135
|
+
Days = "days",
|
|
136
|
+
Hour = "hour",
|
|
137
|
+
Hours = "hours",
|
|
138
|
+
Minute = "minute",
|
|
139
|
+
Minutes = "minutes",
|
|
140
|
+
Second = "second",
|
|
141
|
+
Seconds = "seconds",
|
|
142
|
+
Millisecond = "millisecond",
|
|
143
|
+
Milliseconds = "milliseconds",
|
|
144
|
+
Microsecond = "microsecond",
|
|
145
|
+
Microseconds = "microseconds",
|
|
146
|
+
Nanosecond = "nanosecond",
|
|
147
|
+
Nanoseconds = "nanoseconds",
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/// Total unit option for Duration.total().
|
|
151
|
+
///
|
|
152
|
+
/// Includes all singular and plural temporal units.
|
|
153
|
+
#[wasm_bindgen]
|
|
154
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
155
|
+
pub enum TotalUnit {
|
|
156
|
+
Year = "year",
|
|
157
|
+
Years = "years",
|
|
158
|
+
Month = "month",
|
|
159
|
+
Months = "months",
|
|
160
|
+
Week = "week",
|
|
161
|
+
Weeks = "weeks",
|
|
162
|
+
Day = "day",
|
|
163
|
+
Days = "days",
|
|
164
|
+
Hour = "hour",
|
|
165
|
+
Hours = "hours",
|
|
166
|
+
Minute = "minute",
|
|
167
|
+
Minutes = "minutes",
|
|
168
|
+
Second = "second",
|
|
169
|
+
Seconds = "seconds",
|
|
170
|
+
Millisecond = "millisecond",
|
|
171
|
+
Milliseconds = "milliseconds",
|
|
172
|
+
Microsecond = "microsecond",
|
|
173
|
+
Microseconds = "microseconds",
|
|
174
|
+
Nanosecond = "nanosecond",
|
|
175
|
+
Nanoseconds = "nanoseconds",
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/// Calendar display option for `toString()` methods.
|
|
179
|
+
#[wasm_bindgen]
|
|
180
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
181
|
+
pub enum CalendarDisplay {
|
|
182
|
+
/// Show calendar annotation only when it's not ISO 8601.
|
|
183
|
+
Auto = "auto",
|
|
184
|
+
/// Always show the calendar annotation.
|
|
185
|
+
Always = "always",
|
|
186
|
+
/// Never show the calendar annotation.
|
|
187
|
+
Never = "never",
|
|
188
|
+
/// Always show the calendar annotation with the critical flag.
|
|
189
|
+
Critical = "critical",
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/// Time zone display option for `ZonedDateTime.toString()`.
|
|
193
|
+
#[wasm_bindgen]
|
|
194
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
195
|
+
pub enum TimeZoneDisplay {
|
|
196
|
+
/// Show time zone annotation.
|
|
197
|
+
Auto = "auto",
|
|
198
|
+
/// Never show the time zone annotation.
|
|
199
|
+
Never = "never",
|
|
200
|
+
/// Always show the time zone annotation with the critical flag.
|
|
201
|
+
Critical = "critical",
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/// Offset display option for `ZonedDateTime.toString()`.
|
|
205
|
+
#[wasm_bindgen]
|
|
206
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
207
|
+
pub enum OffsetDisplay {
|
|
208
|
+
/// Show the offset.
|
|
209
|
+
Auto = "auto",
|
|
210
|
+
/// Never show the offset.
|
|
211
|
+
Never = "never",
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/// Direction for `getTimeZoneTransition()`.
|
|
215
|
+
#[wasm_bindgen]
|
|
216
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
217
|
+
pub enum TransitionDirection {
|
|
218
|
+
/// Find the next time zone transition.
|
|
219
|
+
Next = "next",
|
|
220
|
+
/// Find the previous time zone transition.
|
|
221
|
+
Previous = "previous",
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/// Fractional second digits option for `toString()` methods.
|
|
225
|
+
///
|
|
226
|
+
/// Specifies the number of fractional second digits to display (0-9) or 'auto'.
|
|
227
|
+
#[wasm_bindgen]
|
|
228
|
+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
|
229
|
+
pub enum FractionalSecondDigits {
|
|
230
|
+
/// Automatically determine the number of fractional digits.
|
|
231
|
+
Auto = "auto",
|
|
232
|
+
/// Display 0 fractional digits.
|
|
233
|
+
Zero = "0",
|
|
234
|
+
/// Display 1 fractional digit.
|
|
235
|
+
One = "1",
|
|
236
|
+
/// Display 2 fractional digits.
|
|
237
|
+
Two = "2",
|
|
238
|
+
/// Display 3 fractional digits (milliseconds precision).
|
|
239
|
+
Three = "3",
|
|
240
|
+
/// Display 4 fractional digits.
|
|
241
|
+
Four = "4",
|
|
242
|
+
/// Display 5 fractional digits.
|
|
243
|
+
Five = "5",
|
|
244
|
+
/// Display 6 fractional digits (microseconds precision).
|
|
245
|
+
Six = "6",
|
|
246
|
+
/// Display 7 fractional digits.
|
|
247
|
+
Seven = "7",
|
|
248
|
+
/// Display 8 fractional digits.
|
|
249
|
+
Eight = "8",
|
|
250
|
+
/// Display 9 fractional digits (nanoseconds precision).
|
|
251
|
+
Nine = "9",
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// AssignmentOptions - for from() and with() methods
|
|
255
|
+
#[wasm_bindgen]
|
|
256
|
+
extern "C" {
|
|
257
|
+
/// Options for assigning fields using `with()` or entire objects with `from()`.
|
|
258
|
+
///
|
|
259
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/from#options)
|
|
260
|
+
#[wasm_bindgen(extends = Object)]
|
|
261
|
+
#[derive(Clone, Debug)]
|
|
262
|
+
pub type AssignmentOptions;
|
|
263
|
+
|
|
264
|
+
/// Get the overflow handling mode.
|
|
265
|
+
#[wasm_bindgen(method, getter = overflow)]
|
|
266
|
+
pub fn get_overflow(this: &AssignmentOptions) -> Option<TemporalOverflow>;
|
|
267
|
+
|
|
268
|
+
/// Set the overflow handling mode.
|
|
269
|
+
///
|
|
270
|
+
/// - `'constrain'` (default): Out-of-range values are clamped to the nearest in-range value.
|
|
271
|
+
/// - `'reject'`: Out-of-range values will cause the function to throw a RangeError.
|
|
272
|
+
#[wasm_bindgen(method, setter = overflow)]
|
|
273
|
+
pub fn set_overflow(this: &AssignmentOptions, value: TemporalOverflow);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
impl AssignmentOptions {
|
|
277
|
+
/// Creates a new `AssignmentOptions` object.
|
|
278
|
+
pub fn new() -> AssignmentOptions {
|
|
279
|
+
JsCast::unchecked_into(Object::new())
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
impl Default for AssignmentOptions {
|
|
284
|
+
fn default() -> Self {
|
|
285
|
+
Self::new()
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
// DurationOptions - for Duration.from() and Duration.with()
|
|
290
|
+
#[wasm_bindgen]
|
|
291
|
+
extern "C" {
|
|
292
|
+
/// Options for `Duration.from()` and `Duration.with()`.
|
|
293
|
+
///
|
|
294
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/from)
|
|
295
|
+
#[wasm_bindgen(extends = Object)]
|
|
296
|
+
#[derive(Clone, Debug)]
|
|
297
|
+
pub type DurationAssignmentOptions;
|
|
298
|
+
|
|
299
|
+
/// Get the overflow handling mode.
|
|
300
|
+
#[wasm_bindgen(method, getter = overflow)]
|
|
301
|
+
pub fn get_overflow(this: &DurationAssignmentOptions) -> Option<DurationOverflow>;
|
|
302
|
+
|
|
303
|
+
/// Set the overflow handling mode.
|
|
304
|
+
///
|
|
305
|
+
/// - `'constrain'` (default): Out-of-range values are clamped.
|
|
306
|
+
/// - `'balance'`: Out-of-range values are balanced with the next highest unit.
|
|
307
|
+
#[wasm_bindgen(method, setter = overflow)]
|
|
308
|
+
pub fn set_overflow(this: &DurationAssignmentOptions, value: DurationOverflow);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
impl DurationAssignmentOptions {
|
|
312
|
+
/// Creates a new `DurationAssignmentOptions` object.
|
|
313
|
+
pub fn new() -> DurationAssignmentOptions {
|
|
314
|
+
JsCast::unchecked_into(Object::new())
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
impl Default for DurationAssignmentOptions {
|
|
319
|
+
fn default() -> Self {
|
|
320
|
+
Self::new()
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// ToInstantOptions - for PlainDateTime to Instant conversion
|
|
325
|
+
#[wasm_bindgen]
|
|
326
|
+
extern "C" {
|
|
327
|
+
/// Options for conversions of `PlainDateTime` to `Instant`.
|
|
328
|
+
///
|
|
329
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toZonedDateTime#options)
|
|
330
|
+
#[wasm_bindgen(extends = Object)]
|
|
331
|
+
#[derive(Clone, Debug)]
|
|
332
|
+
pub type ToInstantOptions;
|
|
333
|
+
|
|
334
|
+
/// Get the disambiguation mode.
|
|
335
|
+
#[wasm_bindgen(method, getter = disambiguation)]
|
|
336
|
+
pub fn get_disambiguation(this: &ToInstantOptions) -> Option<TemporalDisambiguation>;
|
|
337
|
+
|
|
338
|
+
/// Set the disambiguation mode for handling ambiguous times.
|
|
339
|
+
///
|
|
340
|
+
/// - `'compatible'` (default): Equivalent to `'earlier'` for backward transitions
|
|
341
|
+
/// and `'later'` for forward transitions.
|
|
342
|
+
/// - `'earlier'`: The earlier time of two possible times.
|
|
343
|
+
/// - `'later'`: The later of two possible times.
|
|
344
|
+
/// - `'reject'`: Throw a RangeError instead.
|
|
345
|
+
#[wasm_bindgen(method, setter = disambiguation)]
|
|
346
|
+
pub fn set_disambiguation(this: &ToInstantOptions, value: TemporalDisambiguation);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
impl ToInstantOptions {
|
|
350
|
+
/// Creates a new `ToInstantOptions` object.
|
|
351
|
+
pub fn new() -> ToInstantOptions {
|
|
352
|
+
JsCast::unchecked_into(Object::new())
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
impl Default for ToInstantOptions {
|
|
357
|
+
fn default() -> Self {
|
|
358
|
+
Self::new()
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
// OffsetDisambiguationOptions
|
|
363
|
+
#[wasm_bindgen]
|
|
364
|
+
extern "C" {
|
|
365
|
+
/// Options for handling offset disambiguation in ZonedDateTime.
|
|
366
|
+
#[wasm_bindgen(extends = Object)]
|
|
367
|
+
#[derive(Clone, Debug)]
|
|
368
|
+
pub type OffsetDisambiguationOptions;
|
|
369
|
+
|
|
370
|
+
/// Get the offset option.
|
|
371
|
+
#[wasm_bindgen(method, getter = offset)]
|
|
372
|
+
pub fn get_offset(this: &OffsetDisambiguationOptions) -> Option<TemporalOffsetOption>;
|
|
373
|
+
|
|
374
|
+
/// Set the offset option.
|
|
375
|
+
///
|
|
376
|
+
/// - `'use'`: Always use the offset to calculate the instant.
|
|
377
|
+
/// - `'prefer'`: Use the offset if it's valid, otherwise use the time zone.
|
|
378
|
+
/// - `'ignore'`: Disregard the offset and use the time zone.
|
|
379
|
+
/// - `'reject'`: Throw a RangeError if the offset is not valid.
|
|
380
|
+
#[wasm_bindgen(method, setter = offset)]
|
|
381
|
+
pub fn set_offset(this: &OffsetDisambiguationOptions, value: TemporalOffsetOption);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
impl OffsetDisambiguationOptions {
|
|
385
|
+
/// Creates a new `OffsetDisambiguationOptions` object.
|
|
386
|
+
pub fn new() -> OffsetDisambiguationOptions {
|
|
387
|
+
JsCast::unchecked_into(Object::new())
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
impl Default for OffsetDisambiguationOptions {
|
|
392
|
+
fn default() -> Self {
|
|
393
|
+
Self::new()
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// ZonedDateTimeAssignmentOptions - combines AssignmentOptions + ToInstantOptions + OffsetDisambiguationOptions
|
|
398
|
+
#[wasm_bindgen]
|
|
399
|
+
extern "C" {
|
|
400
|
+
/// Options for `ZonedDateTime.from()` and `ZonedDateTime.with()`.
|
|
401
|
+
///
|
|
402
|
+
/// Combines overflow, disambiguation, and offset options.
|
|
403
|
+
///
|
|
404
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/from#options)
|
|
405
|
+
#[wasm_bindgen(extends = Object)]
|
|
406
|
+
#[derive(Clone, Debug)]
|
|
407
|
+
pub type ZonedDateTimeAssignmentOptions;
|
|
408
|
+
|
|
409
|
+
/// Get the overflow handling mode.
|
|
410
|
+
#[wasm_bindgen(method, getter = overflow)]
|
|
411
|
+
pub fn get_overflow(this: &ZonedDateTimeAssignmentOptions) -> Option<TemporalOverflow>;
|
|
412
|
+
|
|
413
|
+
/// Set the overflow handling mode.
|
|
414
|
+
#[wasm_bindgen(method, setter = overflow)]
|
|
415
|
+
pub fn set_overflow(this: &ZonedDateTimeAssignmentOptions, value: TemporalOverflow);
|
|
416
|
+
|
|
417
|
+
/// Get the disambiguation mode.
|
|
418
|
+
#[wasm_bindgen(method, getter = disambiguation)]
|
|
419
|
+
pub fn get_disambiguation(
|
|
420
|
+
this: &ZonedDateTimeAssignmentOptions,
|
|
421
|
+
) -> Option<TemporalDisambiguation>;
|
|
422
|
+
|
|
423
|
+
/// Set the disambiguation mode.
|
|
424
|
+
#[wasm_bindgen(method, setter = disambiguation)]
|
|
425
|
+
pub fn set_disambiguation(this: &ZonedDateTimeAssignmentOptions, value: TemporalDisambiguation);
|
|
426
|
+
|
|
427
|
+
/// Get the offset option.
|
|
428
|
+
#[wasm_bindgen(method, getter = offset)]
|
|
429
|
+
pub fn get_offset(this: &ZonedDateTimeAssignmentOptions) -> Option<TemporalOffsetOption>;
|
|
430
|
+
|
|
431
|
+
/// Set the offset option.
|
|
432
|
+
#[wasm_bindgen(method, setter = offset)]
|
|
433
|
+
pub fn set_offset(this: &ZonedDateTimeAssignmentOptions, value: TemporalOffsetOption);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
impl ZonedDateTimeAssignmentOptions {
|
|
437
|
+
/// Creates a new `ZonedDateTimeAssignmentOptions` object.
|
|
438
|
+
pub fn new() -> ZonedDateTimeAssignmentOptions {
|
|
439
|
+
JsCast::unchecked_into(Object::new())
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
impl Default for ZonedDateTimeAssignmentOptions {
|
|
444
|
+
fn default() -> Self {
|
|
445
|
+
Self::new()
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// ArithmeticOptions - for add() and subtract()
|
|
450
|
+
#[wasm_bindgen]
|
|
451
|
+
extern "C" {
|
|
452
|
+
/// Options for arithmetic operations like `add()` and `subtract()`.
|
|
453
|
+
///
|
|
454
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add#options)
|
|
455
|
+
#[wasm_bindgen(extends = Object)]
|
|
456
|
+
#[derive(Clone, Debug)]
|
|
457
|
+
pub type ArithmeticOptions;
|
|
458
|
+
|
|
459
|
+
/// Get the overflow handling mode.
|
|
460
|
+
#[wasm_bindgen(method, getter = overflow)]
|
|
461
|
+
pub fn get_overflow(this: &ArithmeticOptions) -> Option<TemporalOverflow>;
|
|
462
|
+
|
|
463
|
+
/// Set the overflow handling mode.
|
|
464
|
+
///
|
|
465
|
+
/// - `'constrain'` (default): Clamp the result to the allowed range.
|
|
466
|
+
/// - `'reject'`: Throw a RangeError if the result is out of range.
|
|
467
|
+
#[wasm_bindgen(method, setter = overflow)]
|
|
468
|
+
pub fn set_overflow(this: &ArithmeticOptions, value: TemporalOverflow);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
impl ArithmeticOptions {
|
|
472
|
+
/// Creates a new `ArithmeticOptions` object.
|
|
473
|
+
pub fn new() -> ArithmeticOptions {
|
|
474
|
+
JsCast::unchecked_into(Object::new())
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
impl Default for ArithmeticOptions {
|
|
479
|
+
fn default() -> Self {
|
|
480
|
+
Self::new()
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
// ToStringPrecisionOptions - base options for toString
|
|
485
|
+
#[wasm_bindgen]
|
|
486
|
+
extern "C" {
|
|
487
|
+
/// Options for outputting precision in `toString()` on types with seconds.
|
|
488
|
+
///
|
|
489
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/toString#options)
|
|
490
|
+
#[wasm_bindgen(extends = Object)]
|
|
491
|
+
#[derive(Clone, Debug)]
|
|
492
|
+
pub type ToStringPrecisionOptions;
|
|
493
|
+
|
|
494
|
+
/// Get the fractional second digits option.
|
|
495
|
+
#[wasm_bindgen(method, getter = fractionalSecondDigits)]
|
|
496
|
+
pub fn get_fractional_second_digits(
|
|
497
|
+
this: &ToStringPrecisionOptions,
|
|
498
|
+
) -> Option<FractionalSecondDigits>;
|
|
499
|
+
|
|
500
|
+
/// Set the number of fractional second digits to display.
|
|
501
|
+
#[wasm_bindgen(method, setter = fractionalSecondDigits)]
|
|
502
|
+
pub fn set_fractional_second_digits(
|
|
503
|
+
this: &ToStringPrecisionOptions,
|
|
504
|
+
value: FractionalSecondDigits,
|
|
505
|
+
);
|
|
506
|
+
|
|
507
|
+
/// Get the smallest unit option.
|
|
508
|
+
#[wasm_bindgen(method, getter = smallestUnit)]
|
|
509
|
+
pub fn get_smallest_unit(this: &ToStringPrecisionOptions) -> Option<SmallestUnit>;
|
|
510
|
+
|
|
511
|
+
/// Set the smallest unit to display.
|
|
512
|
+
#[wasm_bindgen(method, setter = smallestUnit)]
|
|
513
|
+
pub fn set_smallest_unit(this: &ToStringPrecisionOptions, value: SmallestUnit);
|
|
514
|
+
|
|
515
|
+
/// Get the rounding mode.
|
|
516
|
+
/// Note: Reuses `Intl::RoundingMode` which has identical values.
|
|
517
|
+
#[wasm_bindgen(method, getter = roundingMode)]
|
|
518
|
+
pub fn get_rounding_mode(this: &ToStringPrecisionOptions) -> Option<super::Intl::RoundingMode>;
|
|
519
|
+
|
|
520
|
+
/// Set the rounding mode.
|
|
521
|
+
#[wasm_bindgen(method, setter = roundingMode)]
|
|
522
|
+
pub fn set_rounding_mode(this: &ToStringPrecisionOptions, value: super::Intl::RoundingMode);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
impl ToStringPrecisionOptions {
|
|
526
|
+
/// Creates a new `ToStringPrecisionOptions` object.
|
|
527
|
+
pub fn new() -> ToStringPrecisionOptions {
|
|
528
|
+
JsCast::unchecked_into(Object::new())
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
impl Default for ToStringPrecisionOptions {
|
|
533
|
+
fn default() -> Self {
|
|
534
|
+
Self::new()
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
// ShowCalendarOptions
|
|
3
539
|
#[wasm_bindgen]
|
|
4
540
|
extern "C" {
|
|
541
|
+
/// Options for showing calendar in `toString()` output.
|
|
542
|
+
///
|
|
543
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/toString#options)
|
|
544
|
+
#[wasm_bindgen(extends = Object)]
|
|
545
|
+
#[derive(Clone, Debug)]
|
|
546
|
+
pub type ShowCalendarOptions;
|
|
547
|
+
|
|
548
|
+
/// Get the calendar name display option.
|
|
549
|
+
#[wasm_bindgen(method, getter = calendarName)]
|
|
550
|
+
pub fn get_calendar_name(this: &ShowCalendarOptions) -> Option<CalendarDisplay>;
|
|
551
|
+
|
|
552
|
+
/// Set the calendar name display option.
|
|
553
|
+
///
|
|
554
|
+
/// - `'auto'` (default): Show calendar only when it's not ISO 8601.
|
|
555
|
+
/// - `'always'`: Always show the calendar annotation.
|
|
556
|
+
/// - `'never'`: Never show the calendar annotation.
|
|
557
|
+
/// - `'critical'`: Always show with the critical flag.
|
|
558
|
+
#[wasm_bindgen(method, setter = calendarName)]
|
|
559
|
+
pub fn set_calendar_name(this: &ShowCalendarOptions, value: CalendarDisplay);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
impl ShowCalendarOptions {
|
|
563
|
+
/// Creates a new `ShowCalendarOptions` object.
|
|
564
|
+
pub fn new() -> ShowCalendarOptions {
|
|
565
|
+
JsCast::unchecked_into(Object::new())
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
impl Default for ShowCalendarOptions {
|
|
570
|
+
fn default() -> Self {
|
|
571
|
+
Self::new()
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// CalendarTypeToStringOptions - extends ToStringPrecisionOptions with calendar option
|
|
576
|
+
#[wasm_bindgen]
|
|
577
|
+
extern "C" {
|
|
578
|
+
/// Options for `toString()` on calendar types (PlainDateTime, PlainDate, etc.).
|
|
579
|
+
///
|
|
580
|
+
/// Extends `ToStringPrecisionOptions` with calendar display option.
|
|
581
|
+
#[wasm_bindgen(extends = ToStringPrecisionOptions)]
|
|
582
|
+
#[derive(Clone, Debug)]
|
|
583
|
+
pub type CalendarTypeToStringOptions;
|
|
584
|
+
|
|
585
|
+
/// Get the calendar name display option.
|
|
586
|
+
#[wasm_bindgen(method, getter = calendarName)]
|
|
587
|
+
pub fn get_calendar_name(this: &CalendarTypeToStringOptions) -> Option<CalendarDisplay>;
|
|
588
|
+
|
|
589
|
+
/// Set the calendar name display option.
|
|
590
|
+
#[wasm_bindgen(method, setter = calendarName)]
|
|
591
|
+
pub fn set_calendar_name(this: &CalendarTypeToStringOptions, value: CalendarDisplay);
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
impl CalendarTypeToStringOptions {
|
|
595
|
+
/// Creates a new `CalendarTypeToStringOptions` object.
|
|
596
|
+
pub fn new() -> CalendarTypeToStringOptions {
|
|
597
|
+
JsCast::unchecked_into(Object::new())
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
impl Default for CalendarTypeToStringOptions {
|
|
602
|
+
fn default() -> Self {
|
|
603
|
+
Self::new()
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
// ZonedDateTimeToStringOptions - extends CalendarTypeToStringOptions
|
|
608
|
+
#[wasm_bindgen]
|
|
609
|
+
extern "C" {
|
|
610
|
+
/// Options for `ZonedDateTime.toString()`.
|
|
611
|
+
///
|
|
612
|
+
/// Extends `CalendarTypeToStringOptions` with time zone and offset display options.
|
|
613
|
+
///
|
|
614
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toString#options)
|
|
615
|
+
#[wasm_bindgen(extends = CalendarTypeToStringOptions)]
|
|
616
|
+
#[derive(Clone, Debug)]
|
|
617
|
+
pub type ZonedDateTimeToStringOptions;
|
|
618
|
+
|
|
619
|
+
/// Get the time zone name display option.
|
|
620
|
+
#[wasm_bindgen(method, getter = timeZoneName)]
|
|
621
|
+
pub fn get_time_zone_name(this: &ZonedDateTimeToStringOptions) -> Option<TimeZoneDisplay>;
|
|
622
|
+
|
|
623
|
+
/// Set the time zone name display option.
|
|
624
|
+
///
|
|
625
|
+
/// - `'auto'` (default): Show the time zone annotation.
|
|
626
|
+
/// - `'never'`: Never show the time zone annotation.
|
|
627
|
+
/// - `'critical'`: Always show with the critical flag.
|
|
628
|
+
#[wasm_bindgen(method, setter = timeZoneName)]
|
|
629
|
+
pub fn set_time_zone_name(this: &ZonedDateTimeToStringOptions, value: TimeZoneDisplay);
|
|
630
|
+
|
|
631
|
+
/// Get the offset display option.
|
|
632
|
+
#[wasm_bindgen(method, getter = offset)]
|
|
633
|
+
pub fn get_offset(this: &ZonedDateTimeToStringOptions) -> Option<OffsetDisplay>;
|
|
634
|
+
|
|
635
|
+
/// Set the offset display option.
|
|
636
|
+
///
|
|
637
|
+
/// - `'auto'` (default): Show the offset.
|
|
638
|
+
/// - `'never'`: Never show the offset.
|
|
639
|
+
#[wasm_bindgen(method, setter = offset)]
|
|
640
|
+
pub fn set_offset(this: &ZonedDateTimeToStringOptions, value: OffsetDisplay);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
impl ZonedDateTimeToStringOptions {
|
|
644
|
+
/// Creates a new `ZonedDateTimeToStringOptions` object.
|
|
645
|
+
pub fn new() -> ZonedDateTimeToStringOptions {
|
|
646
|
+
JsCast::unchecked_into(Object::new())
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
impl Default for ZonedDateTimeToStringOptions {
|
|
651
|
+
fn default() -> Self {
|
|
652
|
+
Self::new()
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
// InstantToStringOptions
|
|
657
|
+
#[wasm_bindgen]
|
|
658
|
+
extern "C" {
|
|
659
|
+
/// Options for `Instant.toString()`.
|
|
660
|
+
///
|
|
661
|
+
/// Extends `ToStringPrecisionOptions` with optional time zone.
|
|
662
|
+
///
|
|
663
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/toString#options)
|
|
664
|
+
#[wasm_bindgen(extends = ToStringPrecisionOptions)]
|
|
665
|
+
#[derive(Clone, Debug)]
|
|
666
|
+
pub type InstantToStringOptions;
|
|
667
|
+
|
|
668
|
+
/// Get the time zone for display (returns a JsValue that may be a string or undefined).
|
|
669
|
+
#[wasm_bindgen(method, getter = timeZone)]
|
|
670
|
+
pub fn get_time_zone(this: &InstantToStringOptions) -> JsValue;
|
|
671
|
+
|
|
672
|
+
/// Set the time zone for display.
|
|
673
|
+
///
|
|
674
|
+
/// If provided, the output will show the wall-clock time in that time zone
|
|
675
|
+
/// with its offset, instead of just 'Z'.
|
|
676
|
+
#[wasm_bindgen(method, setter = timeZone)]
|
|
677
|
+
pub fn set_time_zone(this: &InstantToStringOptions, value: &str);
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
impl InstantToStringOptions {
|
|
681
|
+
/// Creates a new `InstantToStringOptions` object.
|
|
682
|
+
pub fn new() -> InstantToStringOptions {
|
|
683
|
+
JsCast::unchecked_into(Object::new())
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
impl Default for InstantToStringOptions {
|
|
688
|
+
fn default() -> Self {
|
|
689
|
+
Self::new()
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
// DifferenceOptions - for until() and since()
|
|
694
|
+
#[wasm_bindgen]
|
|
695
|
+
extern "C" {
|
|
696
|
+
/// Options to control the result of `until()` and `since()` methods.
|
|
697
|
+
///
|
|
698
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/until#options)
|
|
699
|
+
#[wasm_bindgen(extends = Object)]
|
|
700
|
+
#[derive(Clone, Debug)]
|
|
701
|
+
pub type DifferenceOptions;
|
|
702
|
+
|
|
703
|
+
/// Get the smallest unit option.
|
|
704
|
+
#[wasm_bindgen(method, getter = smallestUnit)]
|
|
705
|
+
pub fn get_smallest_unit(this: &DifferenceOptions) -> Option<SmallestUnit>;
|
|
706
|
+
|
|
707
|
+
/// Set the smallest unit to round to.
|
|
708
|
+
#[wasm_bindgen(method, setter = smallestUnit)]
|
|
709
|
+
pub fn set_smallest_unit(this: &DifferenceOptions, value: SmallestUnit);
|
|
710
|
+
|
|
711
|
+
/// Get the largest unit option.
|
|
712
|
+
#[wasm_bindgen(method, getter = largestUnit)]
|
|
713
|
+
pub fn get_largest_unit(this: &DifferenceOptions) -> Option<LargestUnit>;
|
|
714
|
+
|
|
715
|
+
/// Set the largest unit to allow in the result.
|
|
716
|
+
///
|
|
717
|
+
/// Larger units will be "balanced" into smaller units.
|
|
718
|
+
#[wasm_bindgen(method, setter = largestUnit)]
|
|
719
|
+
pub fn set_largest_unit(this: &DifferenceOptions, value: LargestUnit);
|
|
720
|
+
|
|
721
|
+
/// Get the rounding increment.
|
|
722
|
+
#[wasm_bindgen(method, getter = roundingIncrement)]
|
|
723
|
+
pub fn get_rounding_increment(this: &DifferenceOptions) -> Option<u32>;
|
|
724
|
+
|
|
725
|
+
/// Set the rounding increment.
|
|
726
|
+
///
|
|
727
|
+
/// Allows rounding to an integer number of units.
|
|
728
|
+
#[wasm_bindgen(method, setter = roundingIncrement)]
|
|
729
|
+
pub fn set_rounding_increment(this: &DifferenceOptions, value: u32);
|
|
730
|
+
|
|
731
|
+
/// Get the rounding mode.
|
|
732
|
+
#[wasm_bindgen(method, getter = roundingMode)]
|
|
733
|
+
pub fn get_rounding_mode(this: &DifferenceOptions) -> Option<super::Intl::RoundingMode>;
|
|
734
|
+
|
|
735
|
+
/// Set the rounding mode.
|
|
736
|
+
#[wasm_bindgen(method, setter = roundingMode)]
|
|
737
|
+
pub fn set_rounding_mode(this: &DifferenceOptions, value: super::Intl::RoundingMode);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
impl DifferenceOptions {
|
|
741
|
+
/// Creates a new `DifferenceOptions` object.
|
|
742
|
+
pub fn new() -> DifferenceOptions {
|
|
743
|
+
JsCast::unchecked_into(Object::new())
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
impl Default for DifferenceOptions {
|
|
748
|
+
fn default() -> Self {
|
|
749
|
+
Self::new()
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
// RoundToOptions - for round() methods
|
|
754
|
+
#[wasm_bindgen]
|
|
755
|
+
extern "C" {
|
|
756
|
+
/// Options for `round()` methods on Temporal types.
|
|
757
|
+
///
|
|
758
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/round#options)
|
|
759
|
+
#[wasm_bindgen(extends = Object)]
|
|
760
|
+
#[derive(Clone, Debug)]
|
|
761
|
+
pub type RoundToOptions;
|
|
762
|
+
|
|
763
|
+
/// Get the smallest unit option.
|
|
764
|
+
#[wasm_bindgen(method, getter = smallestUnit)]
|
|
765
|
+
pub fn get_smallest_unit(this: &RoundToOptions) -> Option<SmallestUnit>;
|
|
766
|
+
|
|
767
|
+
/// Set the unit to round to. This option is required.
|
|
768
|
+
#[wasm_bindgen(method, setter = smallestUnit)]
|
|
769
|
+
pub fn set_smallest_unit(this: &RoundToOptions, value: SmallestUnit);
|
|
770
|
+
|
|
771
|
+
/// Get the rounding increment.
|
|
772
|
+
#[wasm_bindgen(method, getter = roundingIncrement)]
|
|
773
|
+
pub fn get_rounding_increment(this: &RoundToOptions) -> Option<u32>;
|
|
774
|
+
|
|
775
|
+
/// Set the rounding increment.
|
|
776
|
+
#[wasm_bindgen(method, setter = roundingIncrement)]
|
|
777
|
+
pub fn set_rounding_increment(this: &RoundToOptions, value: u32);
|
|
778
|
+
|
|
779
|
+
/// Get the rounding mode.
|
|
780
|
+
#[wasm_bindgen(method, getter = roundingMode)]
|
|
781
|
+
pub fn get_rounding_mode(this: &RoundToOptions) -> Option<super::Intl::RoundingMode>;
|
|
782
|
+
|
|
783
|
+
/// Set the rounding mode. Default is `'halfExpand'`.
|
|
784
|
+
#[wasm_bindgen(method, setter = roundingMode)]
|
|
785
|
+
pub fn set_rounding_mode(this: &RoundToOptions, value: super::Intl::RoundingMode);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
impl RoundToOptions {
|
|
789
|
+
/// Creates a new `RoundToOptions` object.
|
|
790
|
+
pub fn new() -> RoundToOptions {
|
|
791
|
+
JsCast::unchecked_into(Object::new())
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
impl Default for RoundToOptions {
|
|
796
|
+
fn default() -> Self {
|
|
797
|
+
Self::new()
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
// DurationRoundToOptions - for Duration.round()
|
|
802
|
+
#[wasm_bindgen]
|
|
803
|
+
extern "C" {
|
|
804
|
+
/// Options for `Duration.round()`.
|
|
805
|
+
///
|
|
806
|
+
/// Either `smallestUnit` or `largestUnit` must be provided.
|
|
807
|
+
///
|
|
808
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/round#options)
|
|
809
|
+
#[wasm_bindgen(extends = Object)]
|
|
810
|
+
#[derive(Clone, Debug)]
|
|
811
|
+
pub type DurationRoundToOptions;
|
|
812
|
+
|
|
813
|
+
/// Get the smallest unit option.
|
|
814
|
+
#[wasm_bindgen(method, getter = smallestUnit)]
|
|
815
|
+
pub fn get_smallest_unit(this: &DurationRoundToOptions) -> Option<SmallestUnit>;
|
|
816
|
+
|
|
817
|
+
/// Set the unit to round to.
|
|
818
|
+
#[wasm_bindgen(method, setter = smallestUnit)]
|
|
819
|
+
pub fn set_smallest_unit(this: &DurationRoundToOptions, value: SmallestUnit);
|
|
820
|
+
|
|
821
|
+
/// Get the largest unit option.
|
|
822
|
+
#[wasm_bindgen(method, getter = largestUnit)]
|
|
823
|
+
pub fn get_largest_unit(this: &DurationRoundToOptions) -> Option<LargestUnit>;
|
|
824
|
+
|
|
825
|
+
/// Set the largest unit to allow in the result.
|
|
826
|
+
#[wasm_bindgen(method, setter = largestUnit)]
|
|
827
|
+
pub fn set_largest_unit(this: &DurationRoundToOptions, value: LargestUnit);
|
|
828
|
+
|
|
829
|
+
/// Get the rounding increment.
|
|
830
|
+
#[wasm_bindgen(method, getter = roundingIncrement)]
|
|
831
|
+
pub fn get_rounding_increment(this: &DurationRoundToOptions) -> Option<u32>;
|
|
832
|
+
|
|
833
|
+
/// Set the rounding increment.
|
|
834
|
+
#[wasm_bindgen(method, setter = roundingIncrement)]
|
|
835
|
+
pub fn set_rounding_increment(this: &DurationRoundToOptions, value: u32);
|
|
836
|
+
|
|
837
|
+
/// Get the rounding mode.
|
|
838
|
+
#[wasm_bindgen(method, getter = roundingMode)]
|
|
839
|
+
pub fn get_rounding_mode(this: &DurationRoundToOptions) -> Option<super::Intl::RoundingMode>;
|
|
840
|
+
|
|
841
|
+
/// Set the rounding mode.
|
|
842
|
+
#[wasm_bindgen(method, setter = roundingMode)]
|
|
843
|
+
pub fn set_rounding_mode(this: &DurationRoundToOptions, value: super::Intl::RoundingMode);
|
|
844
|
+
|
|
845
|
+
/// Get the relativeTo option (returns JsValue as it can be various types).
|
|
846
|
+
#[wasm_bindgen(method, getter = relativeTo)]
|
|
847
|
+
pub fn get_relative_to(this: &DurationRoundToOptions) -> JsValue;
|
|
848
|
+
|
|
849
|
+
/// Set the relativeTo option.
|
|
850
|
+
///
|
|
851
|
+
/// Required when using variable-length units (years, months, weeks).
|
|
852
|
+
/// Can be a `PlainDateTime`, `ZonedDateTime`, or a string/object that
|
|
853
|
+
/// can be parsed as one of those types.
|
|
854
|
+
#[wasm_bindgen(method, setter = relativeTo)]
|
|
855
|
+
pub fn set_relative_to(this: &DurationRoundToOptions, value: &JsValue);
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
impl DurationRoundToOptions {
|
|
859
|
+
/// Creates a new `DurationRoundToOptions` object.
|
|
860
|
+
pub fn new() -> DurationRoundToOptions {
|
|
861
|
+
JsCast::unchecked_into(Object::new())
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
impl Default for DurationRoundToOptions {
|
|
866
|
+
fn default() -> Self {
|
|
867
|
+
Self::new()
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
// DurationTotalOptions - for Duration.total()
|
|
872
|
+
#[wasm_bindgen]
|
|
873
|
+
extern "C" {
|
|
874
|
+
/// Options for `Duration.total()`.
|
|
875
|
+
///
|
|
876
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/total#options)
|
|
877
|
+
#[wasm_bindgen(extends = Object)]
|
|
878
|
+
#[derive(Clone, Debug)]
|
|
879
|
+
pub type DurationTotalOptions;
|
|
880
|
+
|
|
881
|
+
/// Get the unit option.
|
|
882
|
+
#[wasm_bindgen(method, getter = unit)]
|
|
883
|
+
pub fn get_unit(this: &DurationTotalOptions) -> Option<TotalUnit>;
|
|
884
|
+
|
|
885
|
+
/// Set the unit to convert the duration to. This option is required.
|
|
886
|
+
#[wasm_bindgen(method, setter = unit)]
|
|
887
|
+
pub fn set_unit(this: &DurationTotalOptions, value: TotalUnit);
|
|
888
|
+
|
|
889
|
+
/// Get the relativeTo option.
|
|
890
|
+
#[wasm_bindgen(method, getter = relativeTo)]
|
|
891
|
+
pub fn get_relative_to(this: &DurationTotalOptions) -> JsValue;
|
|
892
|
+
|
|
893
|
+
/// Set the relativeTo option.
|
|
894
|
+
///
|
|
895
|
+
/// Required when using variable-length units (years, months, weeks).
|
|
896
|
+
#[wasm_bindgen(method, setter = relativeTo)]
|
|
897
|
+
pub fn set_relative_to(this: &DurationTotalOptions, value: &JsValue);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
impl DurationTotalOptions {
|
|
901
|
+
/// Creates a new `DurationTotalOptions` object.
|
|
902
|
+
pub fn new() -> DurationTotalOptions {
|
|
903
|
+
JsCast::unchecked_into(Object::new())
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
impl Default for DurationTotalOptions {
|
|
908
|
+
fn default() -> Self {
|
|
909
|
+
Self::new()
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
|
|
913
|
+
// DurationArithmeticOptions - for Duration.compare()
|
|
914
|
+
#[wasm_bindgen]
|
|
915
|
+
extern "C" {
|
|
916
|
+
/// Options for `Duration.compare()`.
|
|
917
|
+
///
|
|
918
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/compare#options)
|
|
919
|
+
#[wasm_bindgen(extends = Object)]
|
|
920
|
+
#[derive(Clone, Debug)]
|
|
921
|
+
pub type DurationArithmeticOptions;
|
|
922
|
+
|
|
923
|
+
/// Get the relativeTo option.
|
|
924
|
+
#[wasm_bindgen(method, getter = relativeTo)]
|
|
925
|
+
pub fn get_relative_to(this: &DurationArithmeticOptions) -> JsValue;
|
|
926
|
+
|
|
927
|
+
/// Set the relativeTo option.
|
|
928
|
+
///
|
|
929
|
+
/// Required when either duration has nonzero weeks or larger units.
|
|
930
|
+
#[wasm_bindgen(method, setter = relativeTo)]
|
|
931
|
+
pub fn set_relative_to(this: &DurationArithmeticOptions, value: &JsValue);
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
impl DurationArithmeticOptions {
|
|
935
|
+
/// Creates a new `DurationArithmeticOptions` object.
|
|
936
|
+
pub fn new() -> DurationArithmeticOptions {
|
|
937
|
+
JsCast::unchecked_into(Object::new())
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
impl Default for DurationArithmeticOptions {
|
|
942
|
+
fn default() -> Self {
|
|
943
|
+
Self::new()
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
|
|
947
|
+
// TimeZoneTransitionOptions - for getTimeZoneTransition()
|
|
948
|
+
#[wasm_bindgen]
|
|
949
|
+
extern "C" {
|
|
950
|
+
/// Options for `ZonedDateTime.getTimeZoneTransition()`.
|
|
951
|
+
///
|
|
952
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/getTimeZoneTransition)
|
|
953
|
+
#[wasm_bindgen(extends = Object)]
|
|
954
|
+
#[derive(Clone, Debug)]
|
|
955
|
+
pub type TimeZoneTransitionOptions;
|
|
956
|
+
|
|
957
|
+
/// Get the direction option.
|
|
958
|
+
#[wasm_bindgen(method, getter = direction)]
|
|
959
|
+
pub fn get_direction(this: &TimeZoneTransitionOptions) -> Option<TransitionDirection>;
|
|
960
|
+
|
|
961
|
+
/// Set the direction to search for transitions.
|
|
962
|
+
///
|
|
963
|
+
/// - `'next'`: Find the next time zone transition.
|
|
964
|
+
/// - `'previous'`: Find the previous time zone transition.
|
|
965
|
+
#[wasm_bindgen(method, setter = direction)]
|
|
966
|
+
pub fn set_direction(this: &TimeZoneTransitionOptions, value: TransitionDirection);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
impl TimeZoneTransitionOptions {
|
|
970
|
+
/// Creates a new `TimeZoneTransitionOptions` object.
|
|
971
|
+
pub fn new() -> TimeZoneTransitionOptions {
|
|
972
|
+
JsCast::unchecked_into(Object::new())
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
impl Default for TimeZoneTransitionOptions {
|
|
977
|
+
fn default() -> Self {
|
|
978
|
+
Self::new()
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
#[wasm_bindgen]
|
|
983
|
+
extern "C" {
|
|
984
|
+
/// A `Temporal.Instant` is an exact point in time, with a precision in
|
|
985
|
+
/// nanoseconds. No time zone or calendar information is present. Therefore,
|
|
986
|
+
/// `Temporal.Instant` has no concept of days, months, or even hours.
|
|
987
|
+
///
|
|
988
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant)
|
|
5
989
|
#[wasm_bindgen(js_namespace = Temporal, extends = Object)]
|
|
6
990
|
#[derive(Clone, Debug)]
|
|
7
991
|
pub type Instant;
|
|
8
992
|
|
|
9
|
-
|
|
10
|
-
|
|
993
|
+
/// The `Temporal.Instant()` constructor creates `Temporal.Instant` objects.
|
|
994
|
+
///
|
|
995
|
+
/// # Errors
|
|
996
|
+
/// Throws a `RangeError` if `epoch_nanoseconds` is outside the valid range.
|
|
997
|
+
///
|
|
998
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/Instant)
|
|
999
|
+
#[wasm_bindgen(constructor, js_namespace = Temporal, catch)]
|
|
1000
|
+
pub fn new(epoch_nanoseconds: &BigInt) -> Result<Instant, JsValue>;
|
|
1001
|
+
|
|
1002
|
+
/// The `Temporal.Instant.from()` static method creates a new `Temporal.Instant`
|
|
1003
|
+
/// object from another `Temporal.Instant` or an RFC 9557 string.
|
|
1004
|
+
///
|
|
1005
|
+
/// # Errors
|
|
1006
|
+
/// Throws a `TypeError` if `item` is not a valid Instant or string.
|
|
1007
|
+
/// Throws a `RangeError` if the string is not a valid RFC 9557 format.
|
|
1008
|
+
///
|
|
1009
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/from)
|
|
1010
|
+
#[wasm_bindgen(static_method_of = Instant, js_namespace = Temporal, catch)]
|
|
1011
|
+
pub fn from(item: &JsValue) -> Result<Instant, JsValue>;
|
|
1012
|
+
|
|
1013
|
+
/// The `Temporal.Instant.fromEpochMilliseconds()` static method creates a new
|
|
1014
|
+
/// `Temporal.Instant` object from the number of milliseconds since the Unix epoch.
|
|
1015
|
+
///
|
|
1016
|
+
/// # Errors
|
|
1017
|
+
/// Throws a `RangeError` if `epoch_milliseconds` is outside the valid range.
|
|
1018
|
+
///
|
|
1019
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/fromEpochMilliseconds)
|
|
1020
|
+
#[wasm_bindgen(static_method_of = Instant, js_namespace = Temporal, js_name = fromEpochMilliseconds, catch)]
|
|
1021
|
+
pub fn from_epoch_milliseconds(epoch_milliseconds: f64) -> Result<Instant, JsValue>;
|
|
1022
|
+
|
|
1023
|
+
/// The `Temporal.Instant.fromEpochNanoseconds()` static method creates a new
|
|
1024
|
+
/// `Temporal.Instant` object from the number of nanoseconds since the Unix epoch.
|
|
1025
|
+
///
|
|
1026
|
+
/// # Errors
|
|
1027
|
+
/// Throws a `RangeError` if `epoch_nanoseconds` is outside the valid range.
|
|
1028
|
+
///
|
|
1029
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/fromEpochNanoseconds)
|
|
1030
|
+
#[wasm_bindgen(static_method_of = Instant, js_namespace = Temporal, js_name = fromEpochNanoseconds, catch)]
|
|
1031
|
+
pub fn from_epoch_nanoseconds(epoch_nanoseconds: &BigInt) -> Result<Instant, JsValue>;
|
|
11
1032
|
|
|
12
|
-
|
|
13
|
-
|
|
1033
|
+
/// The `Temporal.Instant.compare()` static method returns -1, 0, or 1 depending
|
|
1034
|
+
/// on whether `one` comes before, is equal to, or comes after `two`.
|
|
1035
|
+
///
|
|
1036
|
+
/// # Errors
|
|
1037
|
+
/// Throws a `TypeError` if either argument is not a valid Instant or string.
|
|
1038
|
+
///
|
|
1039
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/compare)
|
|
1040
|
+
#[wasm_bindgen(static_method_of = Instant, js_namespace = Temporal, catch)]
|
|
1041
|
+
pub fn compare(one: &JsValue, two: &JsValue) -> Result<i32, JsValue>;
|
|
14
1042
|
|
|
15
|
-
|
|
16
|
-
|
|
1043
|
+
/// The `epochMilliseconds` accessor property returns an integer representing the
|
|
1044
|
+
/// number of milliseconds since the Unix epoch.
|
|
1045
|
+
///
|
|
1046
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/epochMilliseconds)
|
|
17
1047
|
#[wasm_bindgen(method, getter, structural, js_name = epochMilliseconds)]
|
|
18
|
-
pub fn epoch_milliseconds(this: &Instant) ->
|
|
19
|
-
|
|
20
|
-
|
|
1048
|
+
pub fn epoch_milliseconds(this: &Instant) -> f64;
|
|
1049
|
+
|
|
1050
|
+
/// The `epochNanoseconds` accessor property returns a BigInt representing the
|
|
1051
|
+
/// number of nanoseconds since the Unix epoch.
|
|
1052
|
+
///
|
|
1053
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/epochNanoseconds)
|
|
21
1054
|
#[wasm_bindgen(method, getter, structural, js_name = epochNanoseconds)]
|
|
22
1055
|
pub fn epoch_nanoseconds(this: &Instant) -> BigInt;
|
|
23
1056
|
|
|
24
|
-
///
|
|
1057
|
+
/// The `equals()` method returns `true` if this instant is equivalent to `other`.
|
|
25
1058
|
///
|
|
26
|
-
///
|
|
27
|
-
|
|
28
|
-
pub fn add(this: &Instant, duration: &Duration, options: &JsValue) -> Instant;
|
|
29
|
-
|
|
30
|
-
/// This method subtracts duration to Instant.
|
|
1059
|
+
/// # Errors
|
|
1060
|
+
/// Throws a `TypeError` if `other` is not a valid Instant or string.
|
|
31
1061
|
///
|
|
32
|
-
///
|
|
33
|
-
#[wasm_bindgen(method)]
|
|
34
|
-
pub fn
|
|
1062
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/equals)
|
|
1063
|
+
#[wasm_bindgen(method, catch)]
|
|
1064
|
+
pub fn equals(this: &Instant, other: &JsValue) -> Result<bool, JsValue>;
|
|
35
1065
|
|
|
36
|
-
///
|
|
37
|
-
///
|
|
38
|
-
///
|
|
39
|
-
///
|
|
40
|
-
#
|
|
41
|
-
|
|
1066
|
+
/// The `add()` method returns a new `Temporal.Instant` object with the duration
|
|
1067
|
+
/// added to this instant. The years, months, weeks, and days fields of the
|
|
1068
|
+
/// duration must be zero.
|
|
1069
|
+
///
|
|
1070
|
+
/// # Errors
|
|
1071
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
1072
|
+
/// Throws a `RangeError` if the duration has non-zero calendar units (years, months, weeks, days)
|
|
1073
|
+
/// or if the result is out of range.
|
|
1074
|
+
///
|
|
1075
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/add)
|
|
1076
|
+
#[wasm_bindgen(method, catch)]
|
|
1077
|
+
pub fn add(this: &Instant, duration: &JsValue) -> Result<Instant, JsValue>;
|
|
42
1078
|
|
|
43
|
-
///
|
|
44
|
-
///
|
|
45
|
-
///
|
|
46
|
-
///
|
|
47
|
-
#
|
|
48
|
-
|
|
1079
|
+
/// The `subtract()` method returns a new `Temporal.Instant` object with the
|
|
1080
|
+
/// duration subtracted from this instant. The years, months, weeks, and days
|
|
1081
|
+
/// fields of the duration must be zero.
|
|
1082
|
+
///
|
|
1083
|
+
/// # Errors
|
|
1084
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
1085
|
+
/// Throws a `RangeError` if the duration has non-zero calendar units (years, months, weeks, days)
|
|
1086
|
+
/// or if the result is out of range.
|
|
1087
|
+
///
|
|
1088
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/subtract)
|
|
1089
|
+
#[wasm_bindgen(method, catch)]
|
|
1090
|
+
pub fn subtract(this: &Instant, duration: &JsValue) -> Result<Instant, JsValue>;
|
|
49
1091
|
|
|
50
|
-
///
|
|
51
|
-
///
|
|
52
|
-
///
|
|
53
|
-
#
|
|
54
|
-
|
|
1092
|
+
/// The `until()` method returns a `Temporal.Duration` representing the duration
|
|
1093
|
+
/// from this instant until `other`.
|
|
1094
|
+
///
|
|
1095
|
+
/// # Errors
|
|
1096
|
+
/// Throws a `TypeError` if `other` is not a valid Instant or string.
|
|
1097
|
+
/// Throws a `RangeError` if options specify invalid units (calendar units are not allowed).
|
|
1098
|
+
///
|
|
1099
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/until)
|
|
1100
|
+
#[wasm_bindgen(method, catch)]
|
|
1101
|
+
pub fn until(
|
|
1102
|
+
this: &Instant,
|
|
1103
|
+
other: &JsValue,
|
|
1104
|
+
options: &DifferenceOptions,
|
|
1105
|
+
) -> Result<Duration, JsValue>;
|
|
1106
|
+
|
|
1107
|
+
/// The `since()` method returns a `Temporal.Duration` representing the duration
|
|
1108
|
+
/// from `other` until this instant.
|
|
1109
|
+
///
|
|
1110
|
+
/// # Errors
|
|
1111
|
+
/// Throws a `TypeError` if `other` is not a valid Instant or string.
|
|
1112
|
+
/// Throws a `RangeError` if options specify invalid units (calendar units are not allowed).
|
|
1113
|
+
///
|
|
1114
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/since)
|
|
1115
|
+
#[wasm_bindgen(method, catch)]
|
|
1116
|
+
pub fn since(
|
|
1117
|
+
this: &Instant,
|
|
1118
|
+
other: &JsValue,
|
|
1119
|
+
options: &DifferenceOptions,
|
|
1120
|
+
) -> Result<Duration, JsValue>;
|
|
1121
|
+
|
|
1122
|
+
/// The `round()` method returns a new `Temporal.Instant` object with the instant
|
|
1123
|
+
/// rounded to the given unit.
|
|
1124
|
+
///
|
|
1125
|
+
/// # Errors
|
|
1126
|
+
/// Throws a `RangeError` if `smallestUnit` is not provided, specifies calendar units,
|
|
1127
|
+
/// or if `roundingIncrement` is invalid for the unit.
|
|
1128
|
+
///
|
|
1129
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/round)
|
|
1130
|
+
#[wasm_bindgen(method, catch)]
|
|
1131
|
+
pub fn round(this: &Instant, round_to: &RoundToOptions) -> Result<Instant, JsValue>;
|
|
1132
|
+
|
|
1133
|
+
#[wasm_bindgen(method, js_name = toZonedDateTimeISO, catch)]
|
|
1134
|
+
fn to_zoned_date_time_iso_internal(
|
|
1135
|
+
this: &Instant,
|
|
1136
|
+
time_zone: &JsValue,
|
|
1137
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
1138
|
+
|
|
1139
|
+
/// The `toLocaleString()` method returns a language-sensitive string representation
|
|
1140
|
+
/// of this instant.
|
|
1141
|
+
///
|
|
1142
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/toLocaleString)
|
|
1143
|
+
#[wasm_bindgen(method, js_name = toLocaleString)]
|
|
1144
|
+
pub fn to_locale_string(this: &Instant, locales: &[JsString], options: &JsValue) -> JsString;
|
|
55
1145
|
|
|
56
|
-
|
|
57
|
-
|
|
1146
|
+
/// The `toJSON()` method returns a string representation of this instant suitable
|
|
1147
|
+
/// for JSON serialization.
|
|
1148
|
+
///
|
|
1149
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/toJSON)
|
|
1150
|
+
#[wasm_bindgen(method, js_name = toJSON)]
|
|
1151
|
+
pub fn to_json(this: &Instant) -> JsString;
|
|
58
1152
|
|
|
59
|
-
///
|
|
60
|
-
///
|
|
61
|
-
///
|
|
1153
|
+
/// The `toString()` method returns an RFC 9557 string representation of this instant.
|
|
1154
|
+
///
|
|
1155
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/toString)
|
|
62
1156
|
#[wasm_bindgen(method, js_name = toString)]
|
|
63
|
-
pub fn
|
|
1157
|
+
pub fn to_js_string(this: &Instant, options: &InstantToStringOptions) -> JsString;
|
|
1158
|
+
}
|
|
64
1159
|
|
|
65
|
-
|
|
66
|
-
///
|
|
1160
|
+
impl Instant {
|
|
1161
|
+
/// Returns a `Temporal.ZonedDateTime` representing this instant in the
|
|
1162
|
+
/// ISO 8601 calendar and the specified time zone (from a `ZonedDateTime`).
|
|
67
1163
|
///
|
|
68
|
-
///
|
|
69
|
-
#[
|
|
70
|
-
pub fn
|
|
1164
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/toZonedDateTimeISO)
|
|
1165
|
+
#[inline]
|
|
1166
|
+
pub fn to_zoned_date_time_iso_with_timezone(&self, time_zone: &ZonedDateTime) -> ZonedDateTime {
|
|
1167
|
+
// SAFETY: A valid ZonedDateTime always has a valid time zone
|
|
1168
|
+
self.to_zoned_date_time_iso_internal(time_zone.as_ref())
|
|
1169
|
+
.unwrap()
|
|
1170
|
+
}
|
|
71
1171
|
|
|
1172
|
+
/// Returns a `Temporal.ZonedDateTime` representing this instant in the
|
|
1173
|
+
/// ISO 8601 calendar and the specified time zone (as a string identifier).
|
|
1174
|
+
///
|
|
1175
|
+
/// # Errors
|
|
1176
|
+
/// Throws a `RangeError` if the time zone identifier is invalid.
|
|
1177
|
+
///
|
|
1178
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Instant/toZonedDateTimeISO)
|
|
1179
|
+
#[inline]
|
|
1180
|
+
pub fn to_zoned_date_time_iso_with_timezone_str(
|
|
1181
|
+
&self,
|
|
1182
|
+
time_zone: &str,
|
|
1183
|
+
) -> Result<ZonedDateTime, JsValue> {
|
|
1184
|
+
self.to_zoned_date_time_iso_internal(&JsValue::from_str(time_zone))
|
|
1185
|
+
}
|
|
72
1186
|
}
|
|
73
1187
|
|
|
74
1188
|
#[wasm_bindgen]
|
|
75
1189
|
extern "C" {
|
|
1190
|
+
/// A `Temporal.PlainDateTime` represents a calendar date and wall-clock time, with
|
|
1191
|
+
/// a precision in nanoseconds, and without any time zone.
|
|
1192
|
+
///
|
|
1193
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime)
|
|
76
1194
|
#[wasm_bindgen(js_namespace = Temporal, extends = Object)]
|
|
77
1195
|
#[derive(Clone, Debug)]
|
|
78
1196
|
pub type PlainDateTime;
|
|
79
1197
|
|
|
80
|
-
|
|
81
|
-
|
|
1198
|
+
/// The `Temporal.PlainDateTime()` constructor creates `Temporal.PlainDateTime` objects.
|
|
1199
|
+
///
|
|
1200
|
+
/// # Errors
|
|
1201
|
+
/// Throws a `RangeError` if any date or time component is out of range,
|
|
1202
|
+
/// if the date is invalid, or if the calendar identifier is invalid.
|
|
1203
|
+
///
|
|
1204
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/PlainDateTime)
|
|
1205
|
+
#[wasm_bindgen(constructor, js_namespace = Temporal, catch)]
|
|
1206
|
+
pub fn new(
|
|
1207
|
+
iso_year: i32,
|
|
1208
|
+
iso_month: u32,
|
|
1209
|
+
iso_day: u32,
|
|
1210
|
+
hour: u32,
|
|
1211
|
+
minute: u32,
|
|
1212
|
+
second: u32,
|
|
1213
|
+
millisecond: u32,
|
|
1214
|
+
microsecond: u32,
|
|
1215
|
+
nanosecond: u32,
|
|
1216
|
+
calendar: &str,
|
|
1217
|
+
) -> Result<PlainDateTime, JsValue>;
|
|
1218
|
+
|
|
1219
|
+
/// The `Temporal.PlainDateTime.from()` static method creates a new `Temporal.PlainDateTime`
|
|
1220
|
+
/// object from another value.
|
|
1221
|
+
///
|
|
1222
|
+
/// # Errors
|
|
1223
|
+
/// Throws a `TypeError` if `item` is not a valid PlainDateTime, datetime-like object, or string.
|
|
1224
|
+
/// Throws a `RangeError` if the string is invalid or values are out of range
|
|
1225
|
+
/// (when `overflow` is `'reject'`).
|
|
1226
|
+
///
|
|
1227
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/from)
|
|
1228
|
+
#[wasm_bindgen(static_method_of = PlainDateTime, js_namespace = Temporal, catch)]
|
|
1229
|
+
pub fn from(item: &JsValue, options: &AssignmentOptions) -> Result<PlainDateTime, JsValue>;
|
|
1230
|
+
|
|
1231
|
+
/// The `Temporal.PlainDateTime.compare()` static method returns -1, 0, or 1 depending
|
|
1232
|
+
/// on whether `one` comes before, is equal to, or comes after `two`.
|
|
1233
|
+
///
|
|
1234
|
+
/// # Errors
|
|
1235
|
+
/// Throws a `TypeError` if either argument is not a valid PlainDateTime or string.
|
|
1236
|
+
///
|
|
1237
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/compare)
|
|
1238
|
+
#[wasm_bindgen(static_method_of = PlainDateTime, js_namespace = Temporal, catch)]
|
|
1239
|
+
pub fn compare(one: &JsValue, two: &JsValue) -> Result<i32, JsValue>;
|
|
1240
|
+
|
|
1241
|
+
/// The `era` accessor property returns a calendar-specific lowercase string
|
|
1242
|
+
/// representing the era of this date, or `undefined` if the calendar does not use eras.
|
|
1243
|
+
///
|
|
1244
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/era)
|
|
1245
|
+
#[wasm_bindgen(method, getter, structural)]
|
|
1246
|
+
pub fn era(this: &PlainDateTime) -> JsValue;
|
|
82
1247
|
|
|
83
|
-
|
|
84
|
-
|
|
1248
|
+
/// The `eraYear` accessor property returns a non-negative integer representing the
|
|
1249
|
+
/// year of this date within the era, or `undefined` if the calendar does not use eras.
|
|
1250
|
+
///
|
|
1251
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/eraYear)
|
|
1252
|
+
#[wasm_bindgen(method, getter, structural, js_name = eraYear)]
|
|
1253
|
+
pub fn era_year(this: &PlainDateTime) -> JsValue;
|
|
85
1254
|
|
|
1255
|
+
/// The `year` accessor property returns an integer representing the number of years
|
|
1256
|
+
/// of this date relative to the start of a calendar-specific epoch year.
|
|
1257
|
+
///
|
|
1258
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/year)
|
|
86
1259
|
#[wasm_bindgen(method, getter, structural)]
|
|
87
1260
|
pub fn year(this: &PlainDateTime) -> i32;
|
|
1261
|
+
|
|
1262
|
+
/// The `month` accessor property returns a positive integer representing the
|
|
1263
|
+
/// 1-based month index in the year of this date.
|
|
1264
|
+
///
|
|
1265
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/month)
|
|
88
1266
|
#[wasm_bindgen(method, getter, structural)]
|
|
89
1267
|
pub fn month(this: &PlainDateTime) -> u32;
|
|
90
|
-
|
|
91
|
-
|
|
1268
|
+
|
|
1269
|
+
/// The `monthCode` accessor property returns a calendar-specific string representing
|
|
1270
|
+
/// the month of this date.
|
|
1271
|
+
///
|
|
1272
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/monthCode)
|
|
1273
|
+
#[wasm_bindgen(method, getter, structural, js_name = monthCode)]
|
|
1274
|
+
pub fn month_code(this: &PlainDateTime) -> JsString;
|
|
1275
|
+
|
|
1276
|
+
/// The `day` accessor property returns a positive integer representing the
|
|
1277
|
+
/// 1-based day index in the month of this date.
|
|
1278
|
+
///
|
|
1279
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/day)
|
|
92
1280
|
#[wasm_bindgen(method, getter, structural)]
|
|
93
1281
|
pub fn day(this: &PlainDateTime) -> u32;
|
|
1282
|
+
|
|
1283
|
+
/// The `hour` accessor property returns an integer from 0 to 23 representing
|
|
1284
|
+
/// the hour component of this time.
|
|
1285
|
+
///
|
|
1286
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/hour)
|
|
94
1287
|
#[wasm_bindgen(method, getter, structural)]
|
|
95
1288
|
pub fn hour(this: &PlainDateTime) -> u32;
|
|
1289
|
+
|
|
1290
|
+
/// The `minute` accessor property returns an integer from 0 to 59 representing
|
|
1291
|
+
/// the minute component of this time.
|
|
1292
|
+
///
|
|
1293
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/minute)
|
|
96
1294
|
#[wasm_bindgen(method, getter, structural)]
|
|
97
1295
|
pub fn minute(this: &PlainDateTime) -> u32;
|
|
1296
|
+
|
|
1297
|
+
/// The `second` accessor property returns an integer from 0 to 59 representing
|
|
1298
|
+
/// the second component of this time.
|
|
1299
|
+
///
|
|
1300
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/second)
|
|
98
1301
|
#[wasm_bindgen(method, getter, structural)]
|
|
99
1302
|
pub fn second(this: &PlainDateTime) -> u32;
|
|
1303
|
+
|
|
1304
|
+
/// The `millisecond` accessor property returns an integer from 0 to 999 representing
|
|
1305
|
+
/// the millisecond component of this time.
|
|
1306
|
+
///
|
|
1307
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/millisecond)
|
|
100
1308
|
#[wasm_bindgen(method, getter, structural)]
|
|
101
1309
|
pub fn millisecond(this: &PlainDateTime) -> u32;
|
|
1310
|
+
|
|
1311
|
+
/// The `microsecond` accessor property returns an integer from 0 to 999 representing
|
|
1312
|
+
/// the microsecond component of this time.
|
|
1313
|
+
///
|
|
1314
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/microsecond)
|
|
102
1315
|
#[wasm_bindgen(method, getter, structural)]
|
|
103
1316
|
pub fn microsecond(this: &PlainDateTime) -> u32;
|
|
1317
|
+
|
|
1318
|
+
/// The `nanosecond` accessor property returns an integer from 0 to 999 representing
|
|
1319
|
+
/// the nanosecond component of this time.
|
|
1320
|
+
///
|
|
1321
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/nanosecond)
|
|
104
1322
|
#[wasm_bindgen(method, getter, structural)]
|
|
105
1323
|
pub fn nanosecond(this: &PlainDateTime) -> u32;
|
|
106
1324
|
|
|
107
|
-
///
|
|
108
|
-
///
|
|
109
|
-
///
|
|
110
|
-
///
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
pub fn era_year(this: &PlainDateTime) -> JsValue;
|
|
114
|
-
|
|
115
|
-
/// In calendars that use eras, the era and eraYear read-only properties can be used
|
|
116
|
-
/// together to resolve an era-relative year. Both properties are undefined when using
|
|
117
|
-
/// the ISO 8601 calendar. As inputs to from or with, era and eraYear can be used instead
|
|
118
|
-
/// of year. Unlike year, eraYear may decrease as time proceeds because some
|
|
119
|
-
/// eras (like the BCE era in the Gregorian calendar) count years backwards.
|
|
120
|
-
#[wasm_bindgen(method, getter, structural)]
|
|
121
|
-
pub fn era(this: &PlainDateTime) -> JsValue;
|
|
1325
|
+
/// The `calendarId` accessor property returns a string representing the calendar
|
|
1326
|
+
/// used to interpret the internal ISO 8601 date.
|
|
1327
|
+
///
|
|
1328
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/calendarId)
|
|
1329
|
+
#[wasm_bindgen(method, getter, structural, js_name = calendarId)]
|
|
1330
|
+
pub fn calendar_id(this: &PlainDateTime) -> JsString;
|
|
122
1331
|
|
|
123
|
-
/// The dayOfWeek
|
|
124
|
-
///
|
|
125
|
-
///
|
|
1332
|
+
/// The `dayOfWeek` accessor property returns a positive integer representing the
|
|
1333
|
+
/// day of the week of this date (1 = Monday through 7 = Sunday for ISO 8601).
|
|
1334
|
+
///
|
|
1335
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/dayOfWeek)
|
|
126
1336
|
#[wasm_bindgen(method, getter, structural, js_name = dayOfWeek)]
|
|
127
1337
|
pub fn day_of_week(this: &PlainDateTime) -> u32;
|
|
128
1338
|
|
|
129
|
-
/// The dayOfYear
|
|
130
|
-
///
|
|
131
|
-
///
|
|
1339
|
+
/// The `dayOfYear` accessor property returns a positive integer representing the
|
|
1340
|
+
/// 1-based day index of this date in the year.
|
|
1341
|
+
///
|
|
1342
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/dayOfYear)
|
|
132
1343
|
#[wasm_bindgen(method, getter, structural, js_name = dayOfYear)]
|
|
133
1344
|
pub fn day_of_year(this: &PlainDateTime) -> u32;
|
|
134
1345
|
|
|
135
|
-
/// The weekOfYear
|
|
136
|
-
///
|
|
137
|
-
///
|
|
1346
|
+
/// The `weekOfYear` accessor property returns a positive integer representing the
|
|
1347
|
+
/// 1-based week index in the `yearOfWeek` of this date, or `undefined` if the
|
|
1348
|
+
/// calendar does not have a well-defined week system.
|
|
1349
|
+
///
|
|
1350
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/weekOfYear)
|
|
138
1351
|
#[wasm_bindgen(method, getter, structural, js_name = weekOfYear)]
|
|
139
|
-
pub fn week_of_year(this: &PlainDateTime) ->
|
|
1352
|
+
pub fn week_of_year(this: &PlainDateTime) -> JsValue;
|
|
140
1353
|
|
|
141
|
-
/// The
|
|
142
|
-
///
|
|
143
|
-
///
|
|
1354
|
+
/// The `yearOfWeek` accessor property returns an integer representing the year
|
|
1355
|
+
/// to be paired with `weekOfYear`, or `undefined` if the calendar does not have
|
|
1356
|
+
/// a well-defined week system.
|
|
1357
|
+
///
|
|
1358
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/yearOfWeek)
|
|
1359
|
+
#[wasm_bindgen(method, getter, structural, js_name = yearOfWeek)]
|
|
1360
|
+
pub fn year_of_week(this: &PlainDateTime) -> JsValue;
|
|
1361
|
+
|
|
1362
|
+
/// The `daysInWeek` accessor property returns a positive integer representing the
|
|
1363
|
+
/// number of days in the week of this date.
|
|
1364
|
+
///
|
|
1365
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/daysInWeek)
|
|
144
1366
|
#[wasm_bindgen(method, getter, structural, js_name = daysInWeek)]
|
|
145
1367
|
pub fn days_in_week(this: &PlainDateTime) -> u32;
|
|
146
1368
|
|
|
147
|
-
/// The daysInMonth
|
|
148
|
-
///
|
|
149
|
-
///
|
|
1369
|
+
/// The `daysInMonth` accessor property returns a positive integer representing the
|
|
1370
|
+
/// number of days in the month of this date.
|
|
1371
|
+
///
|
|
1372
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/daysInMonth)
|
|
150
1373
|
#[wasm_bindgen(method, getter, structural, js_name = daysInMonth)]
|
|
151
1374
|
pub fn days_in_month(this: &PlainDateTime) -> u32;
|
|
152
1375
|
|
|
153
|
-
/// The daysInYear
|
|
154
|
-
///
|
|
155
|
-
///
|
|
1376
|
+
/// The `daysInYear` accessor property returns a positive integer representing the
|
|
1377
|
+
/// number of days in the year of this date.
|
|
1378
|
+
///
|
|
1379
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/daysInYear)
|
|
156
1380
|
#[wasm_bindgen(method, getter, structural, js_name = daysInYear)]
|
|
157
1381
|
pub fn days_in_year(this: &PlainDateTime) -> u32;
|
|
158
1382
|
|
|
159
|
-
/// The monthsInYear
|
|
160
|
-
///
|
|
161
|
-
///
|
|
162
|
-
|
|
1383
|
+
/// The `monthsInYear` accessor property returns a positive integer representing the
|
|
1384
|
+
/// number of months in the year of this date.
|
|
1385
|
+
///
|
|
1386
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/monthsInYear)
|
|
1387
|
+
#[wasm_bindgen(method, getter, structural, js_name = monthsInYear)]
|
|
163
1388
|
pub fn months_in_year(this: &PlainDateTime) -> u32;
|
|
164
1389
|
|
|
165
|
-
/// The inLeapYear
|
|
166
|
-
///
|
|
1390
|
+
/// The `inLeapYear` accessor property returns `true` if this date is in a leap year,
|
|
1391
|
+
/// and `false` otherwise.
|
|
1392
|
+
///
|
|
1393
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/inLeapYear)
|
|
167
1394
|
#[wasm_bindgen(method, getter, structural, js_name = inLeapYear)]
|
|
168
1395
|
pub fn in_leap_year(this: &PlainDateTime) -> bool;
|
|
169
1396
|
|
|
170
|
-
///
|
|
171
|
-
///
|
|
172
|
-
#
|
|
173
|
-
|
|
1397
|
+
/// The `equals()` method returns `true` if this date-time is equivalent to `other`.
|
|
1398
|
+
///
|
|
1399
|
+
/// # Errors
|
|
1400
|
+
/// Throws a `TypeError` if `other` is not a valid PlainDateTime or string.
|
|
1401
|
+
///
|
|
1402
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/equals)
|
|
1403
|
+
#[wasm_bindgen(method, catch)]
|
|
1404
|
+
pub fn equals(this: &PlainDateTime, other: &JsValue) -> Result<bool, JsValue>;
|
|
1405
|
+
|
|
1406
|
+
/// The `with()` method returns a new `Temporal.PlainDateTime` object with some
|
|
1407
|
+
/// fields replaced by new values.
|
|
1408
|
+
///
|
|
1409
|
+
/// # Errors
|
|
1410
|
+
/// Throws a `TypeError` if `info` is not a valid datetime-like object.
|
|
1411
|
+
/// Throws a `RangeError` if values are out of range (when `overflow` is `'reject'`).
|
|
1412
|
+
///
|
|
1413
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/with)
|
|
1414
|
+
#[wasm_bindgen(method, catch)]
|
|
1415
|
+
pub fn with(
|
|
1416
|
+
this: &PlainDateTime,
|
|
1417
|
+
info: &JsValue,
|
|
1418
|
+
options: &AssignmentOptions,
|
|
1419
|
+
) -> Result<PlainDateTime, JsValue>;
|
|
1420
|
+
|
|
1421
|
+
/// The `withPlainTime()` method returns a new `Temporal.PlainDateTime` object with
|
|
1422
|
+
/// the time part replaced by the given time (or midnight if not provided).
|
|
1423
|
+
///
|
|
1424
|
+
/// # Errors
|
|
1425
|
+
/// Throws a `TypeError` if `plain_time` is provided but is not a valid PlainTime or time-like.
|
|
1426
|
+
///
|
|
1427
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/withPlainTime)
|
|
1428
|
+
#[wasm_bindgen(method, js_name = withPlainTime, catch)]
|
|
1429
|
+
pub fn with_plain_time(
|
|
1430
|
+
this: &PlainDateTime,
|
|
1431
|
+
plain_time: &JsValue,
|
|
1432
|
+
) -> Result<PlainDateTime, JsValue>;
|
|
1433
|
+
|
|
1434
|
+
/// The `withCalendar()` method returns a new `Temporal.PlainDateTime` object with
|
|
1435
|
+
/// the calendar replaced.
|
|
1436
|
+
///
|
|
1437
|
+
/// # Errors
|
|
1438
|
+
/// Throws a `RangeError` if the calendar identifier is invalid.
|
|
1439
|
+
///
|
|
1440
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/withCalendar)
|
|
1441
|
+
#[wasm_bindgen(method, js_name = withCalendar, catch)]
|
|
1442
|
+
pub fn with_calendar(this: &PlainDateTime, calendar: &str) -> Result<PlainDateTime, JsValue>;
|
|
1443
|
+
|
|
1444
|
+
/// The `add()` method returns a new `Temporal.PlainDateTime` object with the
|
|
1445
|
+
/// duration added to this date-time.
|
|
1446
|
+
///
|
|
1447
|
+
/// # Errors
|
|
1448
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
1449
|
+
/// Throws a `RangeError` if the result is out of range (when `overflow` is `'reject'`).
|
|
1450
|
+
///
|
|
1451
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/add)
|
|
1452
|
+
#[wasm_bindgen(method, catch)]
|
|
1453
|
+
pub fn add(
|
|
1454
|
+
this: &PlainDateTime,
|
|
1455
|
+
duration: &JsValue,
|
|
1456
|
+
options: &ArithmeticOptions,
|
|
1457
|
+
) -> Result<PlainDateTime, JsValue>;
|
|
1458
|
+
|
|
1459
|
+
/// The `subtract()` method returns a new `Temporal.PlainDateTime` object with the
|
|
1460
|
+
/// duration subtracted from this date-time.
|
|
1461
|
+
///
|
|
1462
|
+
/// # Errors
|
|
1463
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
1464
|
+
/// Throws a `RangeError` if the result is out of range (when `overflow` is `'reject'`).
|
|
1465
|
+
///
|
|
1466
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/subtract)
|
|
1467
|
+
#[wasm_bindgen(method, catch)]
|
|
1468
|
+
pub fn subtract(
|
|
1469
|
+
this: &PlainDateTime,
|
|
1470
|
+
duration: &JsValue,
|
|
1471
|
+
options: &ArithmeticOptions,
|
|
1472
|
+
) -> Result<PlainDateTime, JsValue>;
|
|
174
1473
|
|
|
175
|
-
///
|
|
176
|
-
///
|
|
177
|
-
|
|
178
|
-
|
|
1474
|
+
/// The `until()` method returns a `Temporal.Duration` representing the duration
|
|
1475
|
+
/// from this date-time until `other`.
|
|
1476
|
+
///
|
|
1477
|
+
/// # Errors
|
|
1478
|
+
/// Throws a `TypeError` if `other` is not a valid PlainDateTime or string.
|
|
1479
|
+
/// Throws a `RangeError` if datetimes have different calendars or options are invalid.
|
|
1480
|
+
///
|
|
1481
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/until)
|
|
1482
|
+
#[wasm_bindgen(method, catch)]
|
|
1483
|
+
pub fn until(
|
|
1484
|
+
this: &PlainDateTime,
|
|
1485
|
+
other: &JsValue,
|
|
1486
|
+
options: &DifferenceOptions,
|
|
1487
|
+
) -> Result<Duration, JsValue>;
|
|
1488
|
+
|
|
1489
|
+
/// The `since()` method returns a `Temporal.Duration` representing the duration
|
|
1490
|
+
/// from `other` until this date-time.
|
|
1491
|
+
///
|
|
1492
|
+
/// # Errors
|
|
1493
|
+
/// Throws a `TypeError` if `other` is not a valid PlainDateTime or string.
|
|
1494
|
+
/// Throws a `RangeError` if datetimes have different calendars or options are invalid.
|
|
1495
|
+
///
|
|
1496
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/since)
|
|
1497
|
+
#[wasm_bindgen(method, catch)]
|
|
1498
|
+
pub fn since(
|
|
1499
|
+
this: &PlainDateTime,
|
|
1500
|
+
other: &JsValue,
|
|
1501
|
+
options: &DifferenceOptions,
|
|
1502
|
+
) -> Result<Duration, JsValue>;
|
|
1503
|
+
|
|
1504
|
+
/// The `round()` method returns a new `Temporal.PlainDateTime` object with the
|
|
1505
|
+
/// date-time rounded to the given unit.
|
|
1506
|
+
///
|
|
1507
|
+
/// # Errors
|
|
1508
|
+
/// Throws a `RangeError` if `smallestUnit` is not provided, specifies invalid units,
|
|
1509
|
+
/// or if `roundingIncrement` is invalid for the unit.
|
|
1510
|
+
///
|
|
1511
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/round)
|
|
1512
|
+
#[wasm_bindgen(method, catch)]
|
|
1513
|
+
pub fn round(this: &PlainDateTime, round_to: &RoundToOptions)
|
|
1514
|
+
-> Result<PlainDateTime, JsValue>;
|
|
1515
|
+
|
|
1516
|
+
#[wasm_bindgen(method, js_name = toZonedDateTime, catch)]
|
|
1517
|
+
fn to_zoned_date_time_internal(
|
|
1518
|
+
this: &PlainDateTime,
|
|
1519
|
+
time_zone: &JsValue,
|
|
1520
|
+
options: &ToInstantOptions,
|
|
1521
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
1522
|
+
|
|
1523
|
+
/// The `toPlainDate()` method returns a `Temporal.PlainDate` object representing
|
|
1524
|
+
/// the date part of this date-time.
|
|
1525
|
+
///
|
|
1526
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toPlainDate)
|
|
1527
|
+
#[wasm_bindgen(method, js_name = toPlainDate)]
|
|
1528
|
+
pub fn to_plain_date(this: &PlainDateTime) -> PlainDate;
|
|
179
1529
|
|
|
180
|
-
///
|
|
181
|
-
///
|
|
182
|
-
|
|
183
|
-
|
|
1530
|
+
/// The `toPlainTime()` method returns a `Temporal.PlainTime` object representing
|
|
1531
|
+
/// the time part of this date-time.
|
|
1532
|
+
///
|
|
1533
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toPlainTime)
|
|
1534
|
+
#[wasm_bindgen(method, js_name = toPlainTime)]
|
|
1535
|
+
pub fn to_plain_time(this: &PlainDateTime) -> PlainTime;
|
|
184
1536
|
|
|
185
|
-
///
|
|
186
|
-
|
|
187
|
-
|
|
1537
|
+
/// The `toPlainYearMonth()` method returns a `Temporal.PlainYearMonth` object representing
|
|
1538
|
+
/// the year and month of this date-time.
|
|
1539
|
+
///
|
|
1540
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toPlainYearMonth)
|
|
1541
|
+
#[wasm_bindgen(method, js_name = toPlainYearMonth)]
|
|
1542
|
+
pub fn to_plain_year_month(this: &PlainDateTime) -> PlainYearMonth;
|
|
188
1543
|
|
|
189
|
-
///
|
|
190
|
-
|
|
191
|
-
|
|
1544
|
+
/// The `toPlainMonthDay()` method returns a `Temporal.PlainMonthDay` object representing
|
|
1545
|
+
/// the month and day of this date-time.
|
|
1546
|
+
///
|
|
1547
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toPlainMonthDay)
|
|
1548
|
+
#[wasm_bindgen(method, js_name = toPlainMonthDay)]
|
|
1549
|
+
pub fn to_plain_month_day(this: &PlainDateTime) -> PlainMonthDay;
|
|
192
1550
|
|
|
193
|
-
///
|
|
194
|
-
///
|
|
195
|
-
///
|
|
196
|
-
///
|
|
197
|
-
#[wasm_bindgen(method)]
|
|
198
|
-
pub fn
|
|
1551
|
+
/// The `toLocaleString()` method returns a language-sensitive string representation
|
|
1552
|
+
/// of this date-time.
|
|
1553
|
+
///
|
|
1554
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toLocaleString)
|
|
1555
|
+
#[wasm_bindgen(method, js_name = toLocaleString)]
|
|
1556
|
+
pub fn to_locale_string(
|
|
1557
|
+
this: &PlainDateTime,
|
|
1558
|
+
locales: &[JsString],
|
|
1559
|
+
options: &JsValue,
|
|
1560
|
+
) -> JsString;
|
|
199
1561
|
|
|
200
|
-
///
|
|
201
|
-
///
|
|
202
|
-
///
|
|
203
|
-
///
|
|
204
|
-
#[wasm_bindgen(method)]
|
|
205
|
-
pub fn
|
|
1562
|
+
/// The `toJSON()` method returns a string representation of this date-time suitable
|
|
1563
|
+
/// for JSON serialization.
|
|
1564
|
+
///
|
|
1565
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toJSON)
|
|
1566
|
+
#[wasm_bindgen(method, js_name = toJSON)]
|
|
1567
|
+
pub fn to_json(this: &PlainDateTime) -> JsString;
|
|
206
1568
|
|
|
207
|
-
///
|
|
208
|
-
///
|
|
209
|
-
///
|
|
210
|
-
#[wasm_bindgen(method)]
|
|
211
|
-
pub fn
|
|
1569
|
+
/// The `toString()` method returns an ISO 8601 string representation of this date-time.
|
|
1570
|
+
///
|
|
1571
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toString)
|
|
1572
|
+
#[wasm_bindgen(method, js_name = toString)]
|
|
1573
|
+
pub fn to_js_string(this: &PlainDateTime, options: &CalendarTypeToStringOptions) -> JsString;
|
|
1574
|
+
}
|
|
212
1575
|
|
|
213
|
-
|
|
214
|
-
|
|
1576
|
+
impl PlainDateTime {
|
|
1577
|
+
/// Returns a `Temporal.ZonedDateTime` representing this date-time in the
|
|
1578
|
+
/// specified time zone (from a `ZonedDateTime`).
|
|
1579
|
+
///
|
|
1580
|
+
/// # Errors
|
|
1581
|
+
/// Throws a `RangeError` if `disambiguation` is `'reject'` and the time is ambiguous
|
|
1582
|
+
/// or non-existent in the target time zone.
|
|
1583
|
+
///
|
|
1584
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toZonedDateTime)
|
|
1585
|
+
#[inline]
|
|
1586
|
+
pub fn to_zoned_date_time_with_timezone(
|
|
1587
|
+
&self,
|
|
1588
|
+
time_zone: &ZonedDateTime,
|
|
1589
|
+
options: &ToInstantOptions,
|
|
1590
|
+
) -> Result<ZonedDateTime, JsValue> {
|
|
1591
|
+
self.to_zoned_date_time_internal(time_zone.as_ref(), options)
|
|
1592
|
+
}
|
|
215
1593
|
|
|
216
|
-
/// Returns
|
|
217
|
-
///
|
|
1594
|
+
/// Returns a `Temporal.ZonedDateTime` representing this date-time in the
|
|
1595
|
+
/// specified time zone (as a string identifier).
|
|
218
1596
|
///
|
|
219
|
-
///
|
|
220
|
-
///
|
|
221
|
-
|
|
222
|
-
|
|
1597
|
+
/// # Errors
|
|
1598
|
+
/// Throws a `RangeError` if the time zone identifier is invalid, or if `disambiguation`
|
|
1599
|
+
/// is `'reject'` and the time is ambiguous or non-existent in the target time zone.
|
|
1600
|
+
///
|
|
1601
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDateTime/toZonedDateTime)
|
|
1602
|
+
#[inline]
|
|
1603
|
+
pub fn to_zoned_date_time_with_timezone_str(
|
|
1604
|
+
&self,
|
|
1605
|
+
time_zone: &str,
|
|
1606
|
+
options: &ToInstantOptions,
|
|
1607
|
+
) -> Result<ZonedDateTime, JsValue> {
|
|
1608
|
+
self.to_zoned_date_time_internal(&JsValue::from_str(time_zone), options)
|
|
1609
|
+
}
|
|
223
1610
|
}
|
|
224
1611
|
|
|
225
1612
|
#[wasm_bindgen]
|
|
226
1613
|
extern "C" {
|
|
1614
|
+
/// A `Temporal.ZonedDateTime` is a timezone-aware, calendar-aware date/time object
|
|
1615
|
+
/// that represents a real event that has happened (or will happen) at a particular
|
|
1616
|
+
/// exact time from the perspective of a particular region on Earth.
|
|
1617
|
+
///
|
|
1618
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime)
|
|
227
1619
|
#[wasm_bindgen(js_namespace = Temporal, extends = Object)]
|
|
228
1620
|
#[derive(Clone, Debug)]
|
|
229
1621
|
pub type ZonedDateTime;
|
|
230
1622
|
|
|
231
|
-
|
|
232
|
-
|
|
1623
|
+
/// The `Temporal.ZonedDateTime()` constructor creates `Temporal.ZonedDateTime` objects.
|
|
1624
|
+
///
|
|
1625
|
+
/// # Errors
|
|
1626
|
+
/// Throws a `RangeError` if `epoch_nanoseconds` is outside the valid range,
|
|
1627
|
+
/// or if the time zone or calendar identifier is invalid.
|
|
1628
|
+
///
|
|
1629
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/ZonedDateTime)
|
|
1630
|
+
#[wasm_bindgen(constructor, js_namespace = Temporal, catch)]
|
|
1631
|
+
pub fn new(
|
|
1632
|
+
epoch_nanoseconds: &BigInt,
|
|
1633
|
+
time_zone: &str,
|
|
1634
|
+
calendar: &str,
|
|
1635
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
1636
|
+
|
|
1637
|
+
/// The `Temporal.ZonedDateTime.from()` static method creates a new `Temporal.ZonedDateTime`
|
|
1638
|
+
/// object from another value.
|
|
1639
|
+
///
|
|
1640
|
+
/// # Errors
|
|
1641
|
+
/// Throws a `TypeError` if `item` is not a valid ZonedDateTime, datetime-like object, or string.
|
|
1642
|
+
/// Throws a `RangeError` if the string is invalid, values are out of range
|
|
1643
|
+
/// (when `overflow` is `'reject'`), or the offset is invalid (when `offset` is `'reject'`).
|
|
1644
|
+
///
|
|
1645
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/from)
|
|
1646
|
+
#[wasm_bindgen(static_method_of = ZonedDateTime, js_namespace = Temporal, catch)]
|
|
1647
|
+
pub fn from(
|
|
1648
|
+
item: &JsValue,
|
|
1649
|
+
options: &ZonedDateTimeAssignmentOptions,
|
|
1650
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
1651
|
+
|
|
1652
|
+
/// The `Temporal.ZonedDateTime.compare()` static method returns -1, 0, or 1 depending
|
|
1653
|
+
/// on whether `one` comes before, is equal to, or comes after `two`.
|
|
1654
|
+
///
|
|
1655
|
+
/// # Errors
|
|
1656
|
+
/// Throws a `TypeError` if either argument is not a valid ZonedDateTime or string.
|
|
1657
|
+
///
|
|
1658
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/compare)
|
|
1659
|
+
#[wasm_bindgen(static_method_of = ZonedDateTime, js_namespace = Temporal, catch)]
|
|
1660
|
+
pub fn compare(one: &JsValue, two: &JsValue) -> Result<i32, JsValue>;
|
|
1661
|
+
|
|
1662
|
+
/// The `era` accessor property returns a calendar-specific lowercase string
|
|
1663
|
+
/// representing the era of this date, or `undefined` if the calendar does not use eras.
|
|
1664
|
+
///
|
|
1665
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/era)
|
|
1666
|
+
#[wasm_bindgen(method, getter, structural)]
|
|
1667
|
+
pub fn era(this: &ZonedDateTime) -> JsValue;
|
|
233
1668
|
|
|
234
|
-
|
|
235
|
-
|
|
1669
|
+
/// The `eraYear` accessor property returns a non-negative integer representing the
|
|
1670
|
+
/// year of this date within the era, or `undefined` if the calendar does not use eras.
|
|
1671
|
+
///
|
|
1672
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/eraYear)
|
|
1673
|
+
#[wasm_bindgen(method, getter, structural, js_name = eraYear)]
|
|
1674
|
+
pub fn era_year(this: &ZonedDateTime) -> JsValue;
|
|
236
1675
|
|
|
1676
|
+
/// The `year` accessor property returns an integer representing the number of years
|
|
1677
|
+
/// of this date relative to the start of a calendar-specific epoch year.
|
|
1678
|
+
///
|
|
1679
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/year)
|
|
237
1680
|
#[wasm_bindgen(method, getter, structural)]
|
|
238
1681
|
pub fn year(this: &ZonedDateTime) -> i32;
|
|
1682
|
+
|
|
1683
|
+
/// The `month` accessor property returns a positive integer representing the
|
|
1684
|
+
/// 1-based month index in the year of this date.
|
|
1685
|
+
///
|
|
1686
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/month)
|
|
239
1687
|
#[wasm_bindgen(method, getter, structural)]
|
|
240
1688
|
pub fn month(this: &ZonedDateTime) -> u32;
|
|
241
|
-
|
|
242
|
-
|
|
1689
|
+
|
|
1690
|
+
/// The `monthCode` accessor property returns a calendar-specific string representing
|
|
1691
|
+
/// the month of this date.
|
|
1692
|
+
///
|
|
1693
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/monthCode)
|
|
1694
|
+
#[wasm_bindgen(method, getter, structural, js_name = monthCode)]
|
|
1695
|
+
pub fn month_code(this: &ZonedDateTime) -> JsString;
|
|
1696
|
+
|
|
1697
|
+
/// The `day` accessor property returns a positive integer representing the
|
|
1698
|
+
/// 1-based day index in the month of this date.
|
|
1699
|
+
///
|
|
1700
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/day)
|
|
243
1701
|
#[wasm_bindgen(method, getter, structural)]
|
|
244
1702
|
pub fn day(this: &ZonedDateTime) -> u32;
|
|
1703
|
+
|
|
1704
|
+
/// The `hour` accessor property returns an integer from 0 to 23 representing
|
|
1705
|
+
/// the hour component of this time.
|
|
1706
|
+
///
|
|
1707
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/hour)
|
|
245
1708
|
#[wasm_bindgen(method, getter, structural)]
|
|
246
1709
|
pub fn hour(this: &ZonedDateTime) -> u32;
|
|
1710
|
+
|
|
1711
|
+
/// The `minute` accessor property returns an integer from 0 to 59 representing
|
|
1712
|
+
/// the minute component of this time.
|
|
1713
|
+
///
|
|
1714
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/minute)
|
|
247
1715
|
#[wasm_bindgen(method, getter, structural)]
|
|
248
1716
|
pub fn minute(this: &ZonedDateTime) -> u32;
|
|
1717
|
+
|
|
1718
|
+
/// The `second` accessor property returns an integer from 0 to 59 representing
|
|
1719
|
+
/// the second component of this time.
|
|
1720
|
+
///
|
|
1721
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/second)
|
|
249
1722
|
#[wasm_bindgen(method, getter, structural)]
|
|
250
1723
|
pub fn second(this: &ZonedDateTime) -> u32;
|
|
1724
|
+
|
|
1725
|
+
/// The `millisecond` accessor property returns an integer from 0 to 999 representing
|
|
1726
|
+
/// the millisecond component of this time.
|
|
1727
|
+
///
|
|
1728
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/millisecond)
|
|
251
1729
|
#[wasm_bindgen(method, getter, structural)]
|
|
252
1730
|
pub fn millisecond(this: &ZonedDateTime) -> u32;
|
|
1731
|
+
|
|
1732
|
+
/// The `microsecond` accessor property returns an integer from 0 to 999 representing
|
|
1733
|
+
/// the microsecond component of this time.
|
|
1734
|
+
///
|
|
1735
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/microsecond)
|
|
253
1736
|
#[wasm_bindgen(method, getter, structural)]
|
|
254
1737
|
pub fn microsecond(this: &ZonedDateTime) -> u32;
|
|
1738
|
+
|
|
1739
|
+
/// The `nanosecond` accessor property returns an integer from 0 to 999 representing
|
|
1740
|
+
/// the nanosecond component of this time.
|
|
1741
|
+
///
|
|
1742
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/nanosecond)
|
|
255
1743
|
#[wasm_bindgen(method, getter, structural)]
|
|
256
1744
|
pub fn nanosecond(this: &ZonedDateTime) -> u32;
|
|
257
1745
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
#[wasm_bindgen(method, getter, structural, js_name =
|
|
263
|
-
pub fn
|
|
264
|
-
#[wasm_bindgen(method, getter, structural, js_name = epochNanoseconds)]
|
|
265
|
-
pub fn epoch_nanoseconds(this: &ZonedDateTime) -> BigInt;
|
|
266
|
-
|
|
267
|
-
/// In calendars that use eras, the era and eraYear read-only properties can be used
|
|
268
|
-
/// together to resolve an era-relative year. Both properties are undefined when using
|
|
269
|
-
/// the ISO 8601 calendar. As inputs to from or with, era and eraYear can be used instead
|
|
270
|
-
/// of year. Unlike year, eraYear may decrease as time proceeds because some
|
|
271
|
-
/// eras (like the BCE era in the Gregorian calendar) count years backwards.
|
|
272
|
-
#[wasm_bindgen(method, getter, structural, js_name = eraYear)]
|
|
273
|
-
pub fn era_year(this: &ZonedDateTime) -> JsValue;
|
|
1746
|
+
/// The `timeZoneId` accessor property returns a string representing the time zone
|
|
1747
|
+
/// identifier used to interpret the internal instant.
|
|
1748
|
+
///
|
|
1749
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/timeZoneId)
|
|
1750
|
+
#[wasm_bindgen(method, getter, structural, js_name = timeZoneId)]
|
|
1751
|
+
pub fn time_zone_id(this: &ZonedDateTime) -> JsString;
|
|
274
1752
|
|
|
275
|
-
///
|
|
276
|
-
///
|
|
277
|
-
///
|
|
278
|
-
///
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
pub fn era(this: &ZonedDateTime) -> JsValue;
|
|
1753
|
+
/// The `calendarId` accessor property returns a string representing the calendar
|
|
1754
|
+
/// used to interpret the internal ISO 8601 date.
|
|
1755
|
+
///
|
|
1756
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/calendarId)
|
|
1757
|
+
#[wasm_bindgen(method, getter, structural, js_name = calendarId)]
|
|
1758
|
+
pub fn calendar_id(this: &ZonedDateTime) -> JsString;
|
|
282
1759
|
|
|
283
|
-
/// The dayOfWeek
|
|
284
|
-
///
|
|
285
|
-
///
|
|
1760
|
+
/// The `dayOfWeek` accessor property returns a positive integer representing the
|
|
1761
|
+
/// day of the week of this date (1 = Monday through 7 = Sunday for ISO 8601).
|
|
1762
|
+
///
|
|
1763
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/dayOfWeek)
|
|
286
1764
|
#[wasm_bindgen(method, getter, structural, js_name = dayOfWeek)]
|
|
287
1765
|
pub fn day_of_week(this: &ZonedDateTime) -> u32;
|
|
288
1766
|
|
|
289
|
-
/// The dayOfYear
|
|
290
|
-
///
|
|
291
|
-
///
|
|
1767
|
+
/// The `dayOfYear` accessor property returns a positive integer representing the
|
|
1768
|
+
/// 1-based day index of this date in the year.
|
|
1769
|
+
///
|
|
1770
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/dayOfYear)
|
|
292
1771
|
#[wasm_bindgen(method, getter, structural, js_name = dayOfYear)]
|
|
293
1772
|
pub fn day_of_year(this: &ZonedDateTime) -> u32;
|
|
294
1773
|
|
|
295
|
-
/// The weekOfYear
|
|
296
|
-
///
|
|
297
|
-
///
|
|
1774
|
+
/// The `weekOfYear` accessor property returns a positive integer representing the
|
|
1775
|
+
/// 1-based week index in the `yearOfWeek` of this date, or `undefined` if the
|
|
1776
|
+
/// calendar does not have a well-defined week system.
|
|
1777
|
+
///
|
|
1778
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/weekOfYear)
|
|
298
1779
|
#[wasm_bindgen(method, getter, structural, js_name = weekOfYear)]
|
|
299
|
-
pub fn week_of_year(this: &ZonedDateTime) ->
|
|
1780
|
+
pub fn week_of_year(this: &ZonedDateTime) -> JsValue;
|
|
300
1781
|
|
|
301
|
-
/// The
|
|
302
|
-
///
|
|
303
|
-
///
|
|
1782
|
+
/// The `yearOfWeek` accessor property returns an integer representing the year
|
|
1783
|
+
/// to be paired with `weekOfYear`, or `undefined` if the calendar does not have
|
|
1784
|
+
/// a well-defined week system.
|
|
1785
|
+
///
|
|
1786
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/yearOfWeek)
|
|
1787
|
+
#[wasm_bindgen(method, getter, structural, js_name = yearOfWeek)]
|
|
1788
|
+
pub fn year_of_week(this: &ZonedDateTime) -> JsValue;
|
|
1789
|
+
|
|
1790
|
+
/// The `hoursInDay` accessor property returns a positive number representing the
|
|
1791
|
+
/// number of hours in the current day. Usually 24, but may differ due to DST.
|
|
1792
|
+
///
|
|
1793
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/hoursInDay)
|
|
1794
|
+
#[wasm_bindgen(method, getter, structural, js_name = hoursInDay)]
|
|
1795
|
+
pub fn hours_in_day(this: &ZonedDateTime) -> f64;
|
|
1796
|
+
|
|
1797
|
+
/// The `daysInWeek` accessor property returns a positive integer representing the
|
|
1798
|
+
/// number of days in the week of this date.
|
|
1799
|
+
///
|
|
1800
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/daysInWeek)
|
|
304
1801
|
#[wasm_bindgen(method, getter, structural, js_name = daysInWeek)]
|
|
305
1802
|
pub fn days_in_week(this: &ZonedDateTime) -> u32;
|
|
306
1803
|
|
|
307
|
-
/// The daysInMonth
|
|
308
|
-
///
|
|
309
|
-
///
|
|
1804
|
+
/// The `daysInMonth` accessor property returns a positive integer representing the
|
|
1805
|
+
/// number of days in the month of this date.
|
|
1806
|
+
///
|
|
1807
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/daysInMonth)
|
|
310
1808
|
#[wasm_bindgen(method, getter, structural, js_name = daysInMonth)]
|
|
311
1809
|
pub fn days_in_month(this: &ZonedDateTime) -> u32;
|
|
312
1810
|
|
|
313
|
-
/// The daysInYear
|
|
314
|
-
///
|
|
315
|
-
///
|
|
1811
|
+
/// The `daysInYear` accessor property returns a positive integer representing the
|
|
1812
|
+
/// number of days in the year of this date.
|
|
1813
|
+
///
|
|
1814
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/daysInYear)
|
|
316
1815
|
#[wasm_bindgen(method, getter, structural, js_name = daysInYear)]
|
|
317
1816
|
pub fn days_in_year(this: &ZonedDateTime) -> u32;
|
|
318
1817
|
|
|
319
|
-
/// The monthsInYear
|
|
320
|
-
///
|
|
321
|
-
///
|
|
322
|
-
|
|
1818
|
+
/// The `monthsInYear` accessor property returns a positive integer representing the
|
|
1819
|
+
/// number of months in the year of this date.
|
|
1820
|
+
///
|
|
1821
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/monthsInYear)
|
|
1822
|
+
#[wasm_bindgen(method, getter, structural, js_name = monthsInYear)]
|
|
323
1823
|
pub fn months_in_year(this: &ZonedDateTime) -> u32;
|
|
324
1824
|
|
|
325
|
-
/// The inLeapYear
|
|
326
|
-
///
|
|
1825
|
+
/// The `inLeapYear` accessor property returns `true` if this date is in a leap year,
|
|
1826
|
+
/// and `false` otherwise.
|
|
1827
|
+
///
|
|
1828
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/inLeapYear)
|
|
327
1829
|
#[wasm_bindgen(method, getter, structural, js_name = inLeapYear)]
|
|
328
1830
|
pub fn in_leap_year(this: &ZonedDateTime) -> bool;
|
|
329
1831
|
|
|
330
|
-
/// The `
|
|
331
|
-
///
|
|
332
|
-
///
|
|
333
|
-
///
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
#[wasm_bindgen(method, getter, structural, js_name = inLeapYear)]
|
|
337
|
-
pub fn hours_in_day(this: &ZonedDateTime) -> u32;
|
|
338
|
-
|
|
339
|
-
#[wasm_bindgen(method, getter, structural, js_name = startOfDay)]
|
|
340
|
-
pub fn start_of_day(this: &ZonedDateTime) -> ZonedDateTime;
|
|
1832
|
+
/// The `offsetNanoseconds` accessor property returns an integer representing the
|
|
1833
|
+
/// offset from UTC in nanoseconds.
|
|
1834
|
+
///
|
|
1835
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/offsetNanoseconds)
|
|
1836
|
+
#[wasm_bindgen(method, getter, structural, js_name = offsetNanoseconds)]
|
|
1837
|
+
pub fn offset_nanoseconds(this: &ZonedDateTime) -> i64;
|
|
341
1838
|
|
|
342
|
-
/// The offset
|
|
343
|
-
///
|
|
1839
|
+
/// The `offset` accessor property returns a string representing the offset from UTC
|
|
1840
|
+
/// (e.g., '-08:00' or '+05:30').
|
|
1841
|
+
///
|
|
1842
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/offset)
|
|
344
1843
|
#[wasm_bindgen(method, getter, structural)]
|
|
345
1844
|
pub fn offset(this: &ZonedDateTime) -> JsString;
|
|
346
1845
|
|
|
347
|
-
///
|
|
348
|
-
///
|
|
349
|
-
|
|
350
|
-
|
|
1846
|
+
/// The `epochMilliseconds` accessor property returns an integer representing the
|
|
1847
|
+
/// number of milliseconds since the Unix epoch.
|
|
1848
|
+
///
|
|
1849
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/epochMilliseconds)
|
|
1850
|
+
#[wasm_bindgen(method, getter, structural, js_name = epochMilliseconds)]
|
|
1851
|
+
pub fn epoch_milliseconds(this: &ZonedDateTime) -> f64;
|
|
1852
|
+
|
|
1853
|
+
/// The `epochNanoseconds` accessor property returns a BigInt representing the
|
|
1854
|
+
/// number of nanoseconds since the Unix epoch.
|
|
1855
|
+
///
|
|
1856
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/epochNanoseconds)
|
|
1857
|
+
#[wasm_bindgen(method, getter, structural, js_name = epochNanoseconds)]
|
|
1858
|
+
pub fn epoch_nanoseconds(this: &ZonedDateTime) -> BigInt;
|
|
351
1859
|
|
|
352
|
-
///
|
|
353
|
-
///
|
|
354
|
-
#
|
|
355
|
-
|
|
1860
|
+
/// The `equals()` method returns `true` if this zoned date-time is equivalent to `other`.
|
|
1861
|
+
///
|
|
1862
|
+
/// # Errors
|
|
1863
|
+
/// Throws a `TypeError` if `other` is not a valid ZonedDateTime or string.
|
|
1864
|
+
///
|
|
1865
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/equals)
|
|
1866
|
+
#[wasm_bindgen(method, catch)]
|
|
1867
|
+
pub fn equals(this: &ZonedDateTime, other: &JsValue) -> Result<bool, JsValue>;
|
|
356
1868
|
|
|
357
|
-
///
|
|
358
|
-
///
|
|
359
|
-
|
|
360
|
-
|
|
1869
|
+
/// The `with()` method returns a new `Temporal.ZonedDateTime` object with some fields
|
|
1870
|
+
/// replaced by new values.
|
|
1871
|
+
///
|
|
1872
|
+
/// # Errors
|
|
1873
|
+
/// Throws a `TypeError` if `info` is not a valid datetime-like object.
|
|
1874
|
+
/// Throws a `RangeError` if values are out of range (when `overflow` is `'reject'`),
|
|
1875
|
+
/// or if the offset is invalid (when `offset` is `'reject'`).
|
|
1876
|
+
///
|
|
1877
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/with)
|
|
1878
|
+
#[wasm_bindgen(method, catch)]
|
|
1879
|
+
pub fn with(
|
|
1880
|
+
this: &ZonedDateTime,
|
|
1881
|
+
info: &JsValue,
|
|
1882
|
+
options: &ZonedDateTimeAssignmentOptions,
|
|
1883
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
1884
|
+
|
|
1885
|
+
/// The `withPlainTime()` method returns a new `Temporal.ZonedDateTime` object with
|
|
1886
|
+
/// the time part replaced by the given time (or midnight if not provided).
|
|
1887
|
+
///
|
|
1888
|
+
/// # Errors
|
|
1889
|
+
/// Throws a `TypeError` if `plain_time` is provided but is not a valid PlainTime or time-like.
|
|
1890
|
+
///
|
|
1891
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/withPlainTime)
|
|
1892
|
+
#[wasm_bindgen(method, js_name = withPlainTime, catch)]
|
|
1893
|
+
pub fn with_plain_time(
|
|
1894
|
+
this: &ZonedDateTime,
|
|
1895
|
+
plain_time: &JsValue,
|
|
1896
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
1897
|
+
|
|
1898
|
+
/// The `withPlainDate()` method returns a new `Temporal.ZonedDateTime` object with
|
|
1899
|
+
/// the date part replaced by the given date.
|
|
1900
|
+
///
|
|
1901
|
+
/// # Errors
|
|
1902
|
+
/// Throws a `TypeError` if `plain_date` is not a valid PlainDate or date-like.
|
|
1903
|
+
///
|
|
1904
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/withPlainDate)
|
|
1905
|
+
#[wasm_bindgen(method, js_name = withPlainDate, catch)]
|
|
1906
|
+
pub fn with_plain_date(
|
|
1907
|
+
this: &ZonedDateTime,
|
|
1908
|
+
plain_date: &JsValue,
|
|
1909
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
1910
|
+
|
|
1911
|
+
/// The `withCalendar()` method returns a new `Temporal.ZonedDateTime` object with
|
|
1912
|
+
/// the calendar replaced.
|
|
1913
|
+
///
|
|
1914
|
+
/// # Errors
|
|
1915
|
+
/// Throws a `RangeError` if the calendar identifier is invalid.
|
|
1916
|
+
///
|
|
1917
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/withCalendar)
|
|
1918
|
+
#[wasm_bindgen(method, js_name = withCalendar, catch)]
|
|
1919
|
+
pub fn with_calendar(this: &ZonedDateTime, calendar: &str) -> Result<ZonedDateTime, JsValue>;
|
|
1920
|
+
|
|
1921
|
+
#[wasm_bindgen(method, js_name = withTimeZone, catch)]
|
|
1922
|
+
fn with_time_zone_internal(
|
|
1923
|
+
this: &ZonedDateTime,
|
|
1924
|
+
time_zone: &JsValue,
|
|
1925
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
1926
|
+
|
|
1927
|
+
/// The `add()` method returns a new `Temporal.ZonedDateTime` object with the
|
|
1928
|
+
/// duration added to this zoned date-time.
|
|
1929
|
+
///
|
|
1930
|
+
/// # Errors
|
|
1931
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
1932
|
+
/// Throws a `RangeError` if the result is out of range (when `overflow` is `'reject'`).
|
|
1933
|
+
///
|
|
1934
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/add)
|
|
1935
|
+
#[wasm_bindgen(method, catch)]
|
|
1936
|
+
pub fn add(
|
|
1937
|
+
this: &ZonedDateTime,
|
|
1938
|
+
duration: &JsValue,
|
|
1939
|
+
options: &ArithmeticOptions,
|
|
1940
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
1941
|
+
|
|
1942
|
+
/// The `subtract()` method returns a new `Temporal.ZonedDateTime` object with the
|
|
1943
|
+
/// duration subtracted from this zoned date-time.
|
|
1944
|
+
///
|
|
1945
|
+
/// # Errors
|
|
1946
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
1947
|
+
/// Throws a `RangeError` if the result is out of range (when `overflow` is `'reject'`).
|
|
1948
|
+
///
|
|
1949
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/subtract)
|
|
1950
|
+
#[wasm_bindgen(method, catch)]
|
|
1951
|
+
pub fn subtract(
|
|
1952
|
+
this: &ZonedDateTime,
|
|
1953
|
+
duration: &JsValue,
|
|
1954
|
+
options: &ArithmeticOptions,
|
|
1955
|
+
) -> Result<ZonedDateTime, JsValue>;
|
|
361
1956
|
|
|
362
|
-
///
|
|
363
|
-
|
|
364
|
-
|
|
1957
|
+
/// The `until()` method returns a `Temporal.Duration` representing the duration
|
|
1958
|
+
/// from this zoned date-time until `other`.
|
|
1959
|
+
///
|
|
1960
|
+
/// # Errors
|
|
1961
|
+
/// Throws a `TypeError` if `other` is not a valid ZonedDateTime or string.
|
|
1962
|
+
/// Throws a `RangeError` if dates have different time zones or calendars, or options are invalid.
|
|
1963
|
+
///
|
|
1964
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/until)
|
|
1965
|
+
#[wasm_bindgen(method, catch)]
|
|
1966
|
+
pub fn until(
|
|
1967
|
+
this: &ZonedDateTime,
|
|
1968
|
+
other: &JsValue,
|
|
1969
|
+
options: &DifferenceOptions,
|
|
1970
|
+
) -> Result<Duration, JsValue>;
|
|
1971
|
+
|
|
1972
|
+
/// The `since()` method returns a `Temporal.Duration` representing the duration
|
|
1973
|
+
/// from `other` until this zoned date-time.
|
|
1974
|
+
///
|
|
1975
|
+
/// # Errors
|
|
1976
|
+
/// Throws a `TypeError` if `other` is not a valid ZonedDateTime or string.
|
|
1977
|
+
/// Throws a `RangeError` if dates have different time zones or calendars, or options are invalid.
|
|
1978
|
+
///
|
|
1979
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/since)
|
|
1980
|
+
#[wasm_bindgen(method, catch)]
|
|
1981
|
+
pub fn since(
|
|
1982
|
+
this: &ZonedDateTime,
|
|
1983
|
+
other: &JsValue,
|
|
1984
|
+
options: &DifferenceOptions,
|
|
1985
|
+
) -> Result<Duration, JsValue>;
|
|
1986
|
+
|
|
1987
|
+
/// The `round()` method returns a new `Temporal.ZonedDateTime` object with the
|
|
1988
|
+
/// zoned date-time rounded to the given unit.
|
|
1989
|
+
///
|
|
1990
|
+
/// # Errors
|
|
1991
|
+
/// Throws a `RangeError` if `smallestUnit` is not provided, specifies invalid units,
|
|
1992
|
+
/// or if `roundingIncrement` is invalid for the unit.
|
|
1993
|
+
///
|
|
1994
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/round)
|
|
1995
|
+
#[wasm_bindgen(method, catch)]
|
|
1996
|
+
pub fn round(this: &ZonedDateTime, round_to: &RoundToOptions)
|
|
1997
|
+
-> Result<ZonedDateTime, JsValue>;
|
|
365
1998
|
|
|
366
|
-
///
|
|
367
|
-
|
|
368
|
-
|
|
1999
|
+
/// The `startOfDay()` method returns a `Temporal.ZonedDateTime` object representing
|
|
2000
|
+
/// the start of the day (usually midnight) of this zoned date-time.
|
|
2001
|
+
///
|
|
2002
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/startOfDay)
|
|
2003
|
+
#[wasm_bindgen(method, js_name = startOfDay)]
|
|
2004
|
+
pub fn start_of_day(this: &ZonedDateTime) -> ZonedDateTime;
|
|
369
2005
|
|
|
370
|
-
///
|
|
371
|
-
///
|
|
372
|
-
///
|
|
373
|
-
///
|
|
374
|
-
#[wasm_bindgen(method)]
|
|
375
|
-
pub fn
|
|
2006
|
+
/// The `getTimeZoneTransition()` method returns the next or previous time zone
|
|
2007
|
+
/// transition from this zoned date-time.
|
|
2008
|
+
///
|
|
2009
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/getTimeZoneTransition)
|
|
2010
|
+
#[wasm_bindgen(method, js_name = getTimeZoneTransition)]
|
|
2011
|
+
pub fn get_time_zone_transition(
|
|
2012
|
+
this: &ZonedDateTime,
|
|
2013
|
+
direction: &TimeZoneTransitionOptions,
|
|
2014
|
+
) -> JsValue;
|
|
2015
|
+
|
|
2016
|
+
/// The `toInstant()` method returns a `Temporal.Instant` object representing the
|
|
2017
|
+
/// same instant as this zoned date-time.
|
|
2018
|
+
///
|
|
2019
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toInstant)
|
|
2020
|
+
#[wasm_bindgen(method, js_name = toInstant)]
|
|
2021
|
+
pub fn to_instant(this: &ZonedDateTime) -> Instant;
|
|
376
2022
|
|
|
377
|
-
///
|
|
378
|
-
///
|
|
379
|
-
///
|
|
380
|
-
///
|
|
381
|
-
#[wasm_bindgen(method)]
|
|
382
|
-
pub fn
|
|
2023
|
+
/// The `toPlainDateTime()` method returns a `Temporal.PlainDateTime` object representing
|
|
2024
|
+
/// the date and time parts of this zoned date-time.
|
|
2025
|
+
///
|
|
2026
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toPlainDateTime)
|
|
2027
|
+
#[wasm_bindgen(method, js_name = toPlainDateTime)]
|
|
2028
|
+
pub fn to_plain_date_time(this: &ZonedDateTime) -> PlainDateTime;
|
|
383
2029
|
|
|
384
|
-
///
|
|
385
|
-
///
|
|
386
|
-
///
|
|
387
|
-
|
|
388
|
-
|
|
2030
|
+
/// The `toPlainDate()` method returns a `Temporal.PlainDate` object representing
|
|
2031
|
+
/// the date part of this zoned date-time.
|
|
2032
|
+
///
|
|
2033
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toPlainDate)
|
|
2034
|
+
#[wasm_bindgen(method, js_name = toPlainDate)]
|
|
2035
|
+
pub fn to_plain_date(this: &ZonedDateTime) -> PlainDate;
|
|
389
2036
|
|
|
390
|
-
|
|
391
|
-
|
|
2037
|
+
/// The `toPlainTime()` method returns a `Temporal.PlainTime` object representing
|
|
2038
|
+
/// the time part of this zoned date-time.
|
|
2039
|
+
///
|
|
2040
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toPlainTime)
|
|
2041
|
+
#[wasm_bindgen(method, js_name = toPlainTime)]
|
|
2042
|
+
pub fn to_plain_time(this: &ZonedDateTime) -> PlainTime;
|
|
2043
|
+
|
|
2044
|
+
/// The `toPlainYearMonth()` method returns a `Temporal.PlainYearMonth` object representing
|
|
2045
|
+
/// the year and month of this zoned date-time.
|
|
2046
|
+
///
|
|
2047
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toPlainYearMonth)
|
|
2048
|
+
#[wasm_bindgen(method, js_name = toPlainYearMonth)]
|
|
2049
|
+
pub fn to_plain_year_month(this: &ZonedDateTime) -> PlainYearMonth;
|
|
2050
|
+
|
|
2051
|
+
/// The `toPlainMonthDay()` method returns a `Temporal.PlainMonthDay` object representing
|
|
2052
|
+
/// the month and day of this zoned date-time.
|
|
2053
|
+
///
|
|
2054
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toPlainMonthDay)
|
|
2055
|
+
#[wasm_bindgen(method, js_name = toPlainMonthDay)]
|
|
2056
|
+
pub fn to_plain_month_day(this: &ZonedDateTime) -> PlainMonthDay;
|
|
2057
|
+
|
|
2058
|
+
/// The `toLocaleString()` method returns a language-sensitive string representation
|
|
2059
|
+
/// of this zoned date-time.
|
|
2060
|
+
///
|
|
2061
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toLocaleString)
|
|
2062
|
+
#[wasm_bindgen(method, js_name = toLocaleString)]
|
|
2063
|
+
pub fn to_locale_string(
|
|
2064
|
+
this: &ZonedDateTime,
|
|
2065
|
+
locales: &[JsString],
|
|
2066
|
+
options: &JsValue,
|
|
2067
|
+
) -> JsString;
|
|
392
2068
|
|
|
393
|
-
///
|
|
394
|
-
///
|
|
2069
|
+
/// The `toJSON()` method returns a string representation of this zoned date-time
|
|
2070
|
+
/// suitable for JSON serialization.
|
|
395
2071
|
///
|
|
396
|
-
///
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
2072
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toJSON)
|
|
2073
|
+
#[wasm_bindgen(method, js_name = toJSON)]
|
|
2074
|
+
pub fn to_json(this: &ZonedDateTime) -> JsString;
|
|
2075
|
+
|
|
2076
|
+
/// The `toString()` method returns an RFC 9557 string representation of this
|
|
2077
|
+
/// zoned date-time.
|
|
2078
|
+
///
|
|
2079
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/toString)
|
|
2080
|
+
#[wasm_bindgen(method, js_name = toString)]
|
|
2081
|
+
pub fn to_js_string(this: &ZonedDateTime, options: &ZonedDateTimeToStringOptions) -> JsString;
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
impl ZonedDateTime {
|
|
2085
|
+
/// Returns a new `Temporal.ZonedDateTime` with the time zone replaced
|
|
2086
|
+
/// (using a `ZonedDateTime` to specify the time zone), keeping the same instant.
|
|
2087
|
+
///
|
|
2088
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/withTimeZone)
|
|
2089
|
+
#[inline]
|
|
2090
|
+
pub fn with_time_zone(&self, time_zone: &ZonedDateTime) -> ZonedDateTime {
|
|
2091
|
+
// SAFETY: A valid ZonedDateTime always has a valid time zone
|
|
2092
|
+
self.with_time_zone_internal(time_zone.as_ref()).unwrap()
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
/// Returns a new `Temporal.ZonedDateTime` with the time zone replaced
|
|
2096
|
+
/// (using a string identifier), keeping the same instant.
|
|
2097
|
+
///
|
|
2098
|
+
/// # Errors
|
|
2099
|
+
/// Throws a `RangeError` if the time zone identifier is invalid.
|
|
2100
|
+
///
|
|
2101
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/ZonedDateTime/withTimeZone)
|
|
2102
|
+
#[inline]
|
|
2103
|
+
pub fn with_time_zone_str(&self, time_zone: &str) -> Result<ZonedDateTime, JsValue> {
|
|
2104
|
+
self.with_time_zone_internal(&JsValue::from_str(time_zone))
|
|
2105
|
+
}
|
|
400
2106
|
}
|
|
401
2107
|
|
|
402
2108
|
#[wasm_bindgen]
|
|
403
2109
|
extern "C" {
|
|
2110
|
+
/// A `Temporal.Duration` represents an immutable duration of time which can be
|
|
2111
|
+
/// used in date/time arithmetic.
|
|
2112
|
+
///
|
|
2113
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration)
|
|
404
2114
|
#[wasm_bindgen(js_namespace = Temporal, extends = Object)]
|
|
405
2115
|
#[derive(Clone, Debug)]
|
|
406
2116
|
pub type Duration;
|
|
407
2117
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
2118
|
+
/// The `Temporal.Duration()` constructor creates `Temporal.Duration` objects.
|
|
2119
|
+
///
|
|
2120
|
+
/// # Errors
|
|
2121
|
+
/// Throws a `RangeError` if any component is non-integer, infinite, exceeds
|
|
2122
|
+
/// safe integer range, or if components have mixed signs.
|
|
2123
|
+
///
|
|
2124
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/Duration)
|
|
2125
|
+
#[wasm_bindgen(constructor, js_namespace = Temporal, catch)]
|
|
2126
|
+
pub fn new(
|
|
2127
|
+
years: f64,
|
|
2128
|
+
months: f64,
|
|
2129
|
+
weeks: f64,
|
|
2130
|
+
days: f64,
|
|
2131
|
+
hours: f64,
|
|
2132
|
+
minutes: f64,
|
|
2133
|
+
seconds: f64,
|
|
2134
|
+
milliseconds: f64,
|
|
2135
|
+
microseconds: f64,
|
|
2136
|
+
nanoseconds: f64,
|
|
2137
|
+
) -> Result<Duration, JsValue>;
|
|
2138
|
+
|
|
2139
|
+
/// The `Temporal.Duration.from()` static method creates a new `Temporal.Duration`
|
|
2140
|
+
/// object from another Duration, an object with duration properties, or an ISO 8601 string.
|
|
2141
|
+
///
|
|
2142
|
+
/// # Errors
|
|
2143
|
+
/// Throws a `TypeError` if `item` is not a valid Duration, duration-like object, or string.
|
|
2144
|
+
/// Throws a `RangeError` if the string is not a valid ISO 8601 duration format,
|
|
2145
|
+
/// or if any numeric values are invalid.
|
|
2146
|
+
///
|
|
2147
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/from)
|
|
2148
|
+
#[wasm_bindgen(static_method_of = Duration, js_namespace = Temporal, catch)]
|
|
2149
|
+
pub fn from(item: &JsValue) -> Result<Duration, JsValue>;
|
|
413
2150
|
|
|
2151
|
+
/// The `Temporal.Duration.compare()` static method returns -1, 0, or 1 depending
|
|
2152
|
+
/// on whether `one` is shorter than, equal to, or longer than `two`.
|
|
2153
|
+
///
|
|
2154
|
+
/// # Errors
|
|
2155
|
+
/// Throws a `TypeError` if either argument is not a valid Duration or string.
|
|
2156
|
+
/// Throws a `RangeError` if `relativeTo` is required (when either duration has
|
|
2157
|
+
/// calendar units like years, months, or weeks) but not provided.
|
|
2158
|
+
///
|
|
2159
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/compare)
|
|
2160
|
+
#[wasm_bindgen(static_method_of = Duration, js_namespace = Temporal, catch)]
|
|
2161
|
+
pub fn compare(
|
|
2162
|
+
one: &JsValue,
|
|
2163
|
+
two: &JsValue,
|
|
2164
|
+
options: &DurationArithmeticOptions,
|
|
2165
|
+
) -> Result<i32, JsValue>;
|
|
2166
|
+
|
|
2167
|
+
/// The `sign` accessor property returns -1, 0, or 1 depending on whether
|
|
2168
|
+
/// the duration is negative, zero, or positive.
|
|
2169
|
+
///
|
|
2170
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/sign)
|
|
414
2171
|
#[wasm_bindgen(method, getter, structural)]
|
|
415
|
-
pub fn
|
|
416
|
-
|
|
417
|
-
|
|
2172
|
+
pub fn sign(this: &Duration) -> i32;
|
|
2173
|
+
|
|
2174
|
+
/// The `blank` accessor property returns `true` if the duration represents
|
|
2175
|
+
/// zero length of time, and `false` otherwise.
|
|
2176
|
+
///
|
|
2177
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/blank)
|
|
418
2178
|
#[wasm_bindgen(method, getter, structural)]
|
|
419
|
-
pub fn
|
|
2179
|
+
pub fn blank(this: &Duration) -> bool;
|
|
2180
|
+
|
|
2181
|
+
/// The `years` accessor property returns the number of years in the duration.
|
|
2182
|
+
///
|
|
2183
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/years)
|
|
420
2184
|
#[wasm_bindgen(method, getter, structural)]
|
|
421
|
-
pub fn
|
|
2185
|
+
pub fn years(this: &Duration) -> f64;
|
|
2186
|
+
|
|
2187
|
+
/// The `months` accessor property returns the number of months in the duration.
|
|
2188
|
+
///
|
|
2189
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/months)
|
|
422
2190
|
#[wasm_bindgen(method, getter, structural)]
|
|
423
|
-
pub fn
|
|
2191
|
+
pub fn months(this: &Duration) -> f64;
|
|
2192
|
+
|
|
2193
|
+
/// The `weeks` accessor property returns the number of weeks in the duration.
|
|
2194
|
+
///
|
|
2195
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/weeks)
|
|
424
2196
|
#[wasm_bindgen(method, getter, structural)]
|
|
425
|
-
pub fn
|
|
2197
|
+
pub fn weeks(this: &Duration) -> f64;
|
|
2198
|
+
|
|
2199
|
+
/// The `days` accessor property returns the number of days in the duration.
|
|
2200
|
+
///
|
|
2201
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/days)
|
|
426
2202
|
#[wasm_bindgen(method, getter, structural)]
|
|
427
|
-
pub fn
|
|
2203
|
+
pub fn days(this: &Duration) -> f64;
|
|
2204
|
+
|
|
2205
|
+
/// The `hours` accessor property returns the number of hours in the duration.
|
|
2206
|
+
///
|
|
2207
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/hours)
|
|
428
2208
|
#[wasm_bindgen(method, getter, structural)]
|
|
429
|
-
pub fn
|
|
2209
|
+
pub fn hours(this: &Duration) -> f64;
|
|
2210
|
+
|
|
2211
|
+
/// The `minutes` accessor property returns the number of minutes in the duration.
|
|
2212
|
+
///
|
|
2213
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/minutes)
|
|
430
2214
|
#[wasm_bindgen(method, getter, structural)]
|
|
431
|
-
pub fn
|
|
2215
|
+
pub fn minutes(this: &Duration) -> f64;
|
|
2216
|
+
|
|
2217
|
+
/// The `seconds` accessor property returns the number of seconds in the duration.
|
|
2218
|
+
///
|
|
2219
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/seconds)
|
|
432
2220
|
#[wasm_bindgen(method, getter, structural)]
|
|
433
|
-
pub fn
|
|
2221
|
+
pub fn seconds(this: &Duration) -> f64;
|
|
434
2222
|
|
|
435
|
-
/// The
|
|
436
|
-
///
|
|
2223
|
+
/// The `milliseconds` accessor property returns the number of milliseconds in the duration.
|
|
2224
|
+
///
|
|
2225
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/milliseconds)
|
|
437
2226
|
#[wasm_bindgen(method, getter, structural)]
|
|
438
|
-
pub fn
|
|
2227
|
+
pub fn milliseconds(this: &Duration) -> f64;
|
|
439
2228
|
|
|
440
|
-
/// The
|
|
441
|
-
///
|
|
2229
|
+
/// The `microseconds` accessor property returns the number of microseconds in the duration.
|
|
2230
|
+
///
|
|
2231
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/microseconds)
|
|
442
2232
|
#[wasm_bindgen(method, getter, structural)]
|
|
443
|
-
pub fn
|
|
2233
|
+
pub fn microseconds(this: &Duration) -> f64;
|
|
444
2234
|
|
|
445
|
-
///
|
|
446
|
-
/// so the result is balanced. For usage examples and a more complete explanation of how
|
|
447
|
-
/// balancing works and why it is necessary, see [Duration balancing].
|
|
2235
|
+
/// The `nanoseconds` accessor property returns the number of nanoseconds in the duration.
|
|
448
2236
|
///
|
|
449
|
-
/// [
|
|
450
|
-
#[wasm_bindgen(method)]
|
|
451
|
-
pub fn
|
|
2237
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/nanoseconds)
|
|
2238
|
+
#[wasm_bindgen(method, getter, structural)]
|
|
2239
|
+
pub fn nanoseconds(this: &Duration) -> f64;
|
|
452
2240
|
|
|
453
|
-
///
|
|
454
|
-
///
|
|
455
|
-
/// balancing works and why it is necessary, see [Duration balancing].
|
|
2241
|
+
/// The `negated()` method returns a new `Temporal.Duration` object with the
|
|
2242
|
+
/// opposite sign (positive becomes negative and vice versa).
|
|
456
2243
|
///
|
|
457
|
-
/// [
|
|
2244
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/negated)
|
|
458
2245
|
#[wasm_bindgen(method)]
|
|
459
|
-
pub fn
|
|
2246
|
+
pub fn negated(this: &Duration) -> Duration;
|
|
460
2247
|
|
|
461
|
-
///
|
|
462
|
-
///
|
|
463
|
-
///
|
|
464
|
-
///
|
|
2248
|
+
/// The `abs()` method returns a new `Temporal.Duration` object with the
|
|
2249
|
+
/// absolute value of the duration (all negative values become positive).
|
|
2250
|
+
///
|
|
2251
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/abs)
|
|
465
2252
|
#[wasm_bindgen(method)]
|
|
466
2253
|
pub fn abs(this: &Duration) -> Duration;
|
|
467
2254
|
|
|
468
|
-
///
|
|
469
|
-
///
|
|
470
|
-
|
|
471
|
-
|
|
2255
|
+
/// The `with()` method returns a new `Temporal.Duration` object with some
|
|
2256
|
+
/// fields replaced by new values.
|
|
2257
|
+
///
|
|
2258
|
+
/// # Errors
|
|
2259
|
+
/// Throws a `TypeError` if `duration_like` is not a valid duration-like object.
|
|
2260
|
+
/// Throws a `RangeError` if any numeric values are invalid or result in mixed signs.
|
|
2261
|
+
///
|
|
2262
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/with)
|
|
2263
|
+
#[wasm_bindgen(method, catch)]
|
|
2264
|
+
pub fn with(this: &Duration, duration_like: &JsValue) -> Result<Duration, JsValue>;
|
|
472
2265
|
|
|
473
|
-
///
|
|
474
|
-
///
|
|
475
|
-
///
|
|
476
|
-
///
|
|
477
|
-
///
|
|
478
|
-
|
|
479
|
-
|
|
2266
|
+
/// The `add()` method returns a new `Temporal.Duration` object with the
|
|
2267
|
+
/// sum of this duration and another duration.
|
|
2268
|
+
///
|
|
2269
|
+
/// # Errors
|
|
2270
|
+
/// Throws a `TypeError` if `other` is not a valid Duration or duration-like.
|
|
2271
|
+
/// Throws a `RangeError` if the result would have mixed signs or exceed valid range.
|
|
2272
|
+
///
|
|
2273
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/add)
|
|
2274
|
+
#[wasm_bindgen(method, catch)]
|
|
2275
|
+
pub fn add(this: &Duration, other: &JsValue) -> Result<Duration, JsValue>;
|
|
480
2276
|
|
|
481
|
-
///
|
|
482
|
-
///
|
|
483
|
-
|
|
484
|
-
|
|
2277
|
+
/// The `subtract()` method returns a new `Temporal.Duration` object with the
|
|
2278
|
+
/// difference of this duration and another duration.
|
|
2279
|
+
///
|
|
2280
|
+
/// # Errors
|
|
2281
|
+
/// Throws a `TypeError` if `other` is not a valid Duration or duration-like.
|
|
2282
|
+
/// Throws a `RangeError` if the result would have mixed signs or exceed valid range.
|
|
2283
|
+
///
|
|
2284
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/subtract)
|
|
2285
|
+
#[wasm_bindgen(method, catch)]
|
|
2286
|
+
pub fn subtract(this: &Duration, other: &JsValue) -> Result<Duration, JsValue>;
|
|
485
2287
|
|
|
486
|
-
///
|
|
487
|
-
///
|
|
488
|
-
|
|
489
|
-
|
|
2288
|
+
/// The `round()` method returns a new `Temporal.Duration` object with the
|
|
2289
|
+
/// duration rounded and/or balanced to the given options.
|
|
2290
|
+
///
|
|
2291
|
+
/// # Errors
|
|
2292
|
+
/// Throws a `RangeError` if neither `smallestUnit` nor `largestUnit` is provided,
|
|
2293
|
+
/// if `relativeTo` is required for calendar units but not provided, or if options
|
|
2294
|
+
/// are invalid.
|
|
2295
|
+
///
|
|
2296
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/round)
|
|
2297
|
+
#[wasm_bindgen(method, catch)]
|
|
2298
|
+
pub fn round(this: &Duration, round_to: &DurationRoundToOptions) -> Result<Duration, JsValue>;
|
|
490
2299
|
|
|
491
|
-
///
|
|
492
|
-
///
|
|
2300
|
+
/// The `total()` method returns the total number of the specified unit that
|
|
2301
|
+
/// fits in the duration as a floating point number.
|
|
493
2302
|
///
|
|
494
|
-
///
|
|
2303
|
+
/// # Errors
|
|
2304
|
+
/// Throws a `RangeError` if `unit` is not provided, or if `relativeTo` is required
|
|
2305
|
+
/// for calendar units (years, months, weeks) but not provided.
|
|
2306
|
+
///
|
|
2307
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/total)
|
|
2308
|
+
#[wasm_bindgen(method, catch)]
|
|
2309
|
+
pub fn total(this: &Duration, total_of: &DurationTotalOptions) -> Result<f64, JsValue>;
|
|
2310
|
+
|
|
2311
|
+
/// The `toLocaleString()` method returns a language-sensitive string representation
|
|
2312
|
+
/// of this duration.
|
|
2313
|
+
///
|
|
2314
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/toLocaleString)
|
|
495
2315
|
#[wasm_bindgen(method, js_name = toLocaleString)]
|
|
496
|
-
pub fn to_locale_string(this: &Duration, locales: &
|
|
2316
|
+
pub fn to_locale_string(this: &Duration, locales: &[JsString], options: &JsValue) -> JsString;
|
|
2317
|
+
|
|
2318
|
+
/// The `toJSON()` method returns a string representation of this duration
|
|
2319
|
+
/// suitable for JSON serialization (same as `toString()`).
|
|
2320
|
+
///
|
|
2321
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/toJSON)
|
|
2322
|
+
#[wasm_bindgen(method, js_name = toJSON)]
|
|
2323
|
+
pub fn to_json(this: &Duration) -> JsString;
|
|
497
2324
|
|
|
2325
|
+
/// The `toString()` method returns an ISO 8601 string representation of this duration.
|
|
2326
|
+
///
|
|
2327
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Duration/toString)
|
|
2328
|
+
#[wasm_bindgen(method, js_name = toString)]
|
|
2329
|
+
pub fn to_js_string(this: &Duration, options: &ToStringPrecisionOptions) -> JsString;
|
|
498
2330
|
}
|
|
499
2331
|
|
|
500
2332
|
#[wasm_bindgen]
|
|
501
2333
|
extern "C" {
|
|
2334
|
+
/// A `Temporal.PlainTime` represents a wall-clock time, with a precision in
|
|
2335
|
+
/// nanoseconds, and without any time zone or calendar information.
|
|
2336
|
+
///
|
|
2337
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime)
|
|
502
2338
|
#[wasm_bindgen(js_namespace = Temporal, extends = Object)]
|
|
503
2339
|
#[derive(Clone, Debug)]
|
|
504
2340
|
pub type PlainTime;
|
|
505
2341
|
|
|
506
|
-
|
|
507
|
-
|
|
2342
|
+
/// The `Temporal.PlainTime()` constructor creates `Temporal.PlainTime` objects.
|
|
2343
|
+
///
|
|
2344
|
+
/// # Errors
|
|
2345
|
+
/// Throws a `RangeError` if any component is out of range (hour: 0-23, minute/second: 0-59,
|
|
2346
|
+
/// millisecond/microsecond/nanosecond: 0-999).
|
|
2347
|
+
///
|
|
2348
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/PlainTime)
|
|
2349
|
+
#[wasm_bindgen(constructor, js_namespace = Temporal, catch)]
|
|
2350
|
+
pub fn new(
|
|
2351
|
+
hour: u32,
|
|
2352
|
+
minute: u32,
|
|
2353
|
+
second: u32,
|
|
2354
|
+
millisecond: u32,
|
|
2355
|
+
microsecond: u32,
|
|
2356
|
+
nanosecond: u32,
|
|
2357
|
+
) -> Result<PlainTime, JsValue>;
|
|
2358
|
+
|
|
2359
|
+
/// The `Temporal.PlainTime.from()` static method creates a new `Temporal.PlainTime`
|
|
2360
|
+
/// object from another value.
|
|
2361
|
+
///
|
|
2362
|
+
/// # Errors
|
|
2363
|
+
/// Throws a `TypeError` if `item` is not a valid PlainTime, time-like object, or string.
|
|
2364
|
+
/// Throws a `RangeError` if the string is invalid or values are out of range
|
|
2365
|
+
/// (when `overflow` is `'reject'`).
|
|
2366
|
+
///
|
|
2367
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/from)
|
|
2368
|
+
#[wasm_bindgen(static_method_of = PlainTime, js_namespace = Temporal, catch)]
|
|
2369
|
+
pub fn from(item: &JsValue, options: &AssignmentOptions) -> Result<PlainTime, JsValue>;
|
|
508
2370
|
|
|
509
|
-
|
|
510
|
-
|
|
2371
|
+
/// The `Temporal.PlainTime.compare()` static method returns -1, 0, or 1 depending
|
|
2372
|
+
/// on whether `one` comes before, is equal to, or comes after `two`.
|
|
2373
|
+
///
|
|
2374
|
+
/// # Errors
|
|
2375
|
+
/// Throws a `TypeError` if either argument is not a valid PlainTime or string.
|
|
2376
|
+
///
|
|
2377
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/compare)
|
|
2378
|
+
#[wasm_bindgen(static_method_of = PlainTime, js_namespace = Temporal, catch)]
|
|
2379
|
+
pub fn compare(one: &JsValue, two: &JsValue) -> Result<i32, JsValue>;
|
|
511
2380
|
|
|
2381
|
+
/// The `hour` accessor property returns an integer from 0 to 23 representing
|
|
2382
|
+
/// the hour component of this time.
|
|
2383
|
+
///
|
|
2384
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/hour)
|
|
512
2385
|
#[wasm_bindgen(method, getter, structural)]
|
|
513
2386
|
pub fn hour(this: &PlainTime) -> u32;
|
|
2387
|
+
|
|
2388
|
+
/// The `minute` accessor property returns an integer from 0 to 59 representing
|
|
2389
|
+
/// the minute component of this time.
|
|
2390
|
+
///
|
|
2391
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/minute)
|
|
514
2392
|
#[wasm_bindgen(method, getter, structural)]
|
|
515
2393
|
pub fn minute(this: &PlainTime) -> u32;
|
|
2394
|
+
|
|
2395
|
+
/// The `second` accessor property returns an integer from 0 to 59 representing
|
|
2396
|
+
/// the second component of this time.
|
|
2397
|
+
///
|
|
2398
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/second)
|
|
516
2399
|
#[wasm_bindgen(method, getter, structural)]
|
|
517
2400
|
pub fn second(this: &PlainTime) -> u32;
|
|
2401
|
+
|
|
2402
|
+
/// The `millisecond` accessor property returns an integer from 0 to 999 representing
|
|
2403
|
+
/// the millisecond component of this time.
|
|
2404
|
+
///
|
|
2405
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/millisecond)
|
|
518
2406
|
#[wasm_bindgen(method, getter, structural)]
|
|
519
2407
|
pub fn millisecond(this: &PlainTime) -> u32;
|
|
2408
|
+
|
|
2409
|
+
/// The `microsecond` accessor property returns an integer from 0 to 999 representing
|
|
2410
|
+
/// the microsecond component of this time.
|
|
2411
|
+
///
|
|
2412
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/microsecond)
|
|
520
2413
|
#[wasm_bindgen(method, getter, structural)]
|
|
521
2414
|
pub fn microsecond(this: &PlainTime) -> u32;
|
|
2415
|
+
|
|
2416
|
+
/// The `nanosecond` accessor property returns an integer from 0 to 999 representing
|
|
2417
|
+
/// the nanosecond component of this time.
|
|
2418
|
+
///
|
|
2419
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/nanosecond)
|
|
522
2420
|
#[wasm_bindgen(method, getter, structural)]
|
|
523
2421
|
pub fn nanosecond(this: &PlainTime) -> u32;
|
|
524
2422
|
|
|
525
|
-
///
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
///
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
/// This method computes the difference between the two times represented by PlainTime and
|
|
534
|
-
/// other, optionally rounds it, and returns it as a Temporal.Duration object. If other is earlier
|
|
535
|
-
/// than zonedDateTime then the resulting duration will be negative. The returned Temporal.Duration, when
|
|
536
|
-
/// added to zonedDateTime with the same options, will yield other.
|
|
537
|
-
#[wasm_bindgen(method)]
|
|
538
|
-
pub fn until(this: &PlainTime, other: &PlainTime, options: &JsValue) -> Duration;
|
|
2423
|
+
/// The `equals()` method returns `true` if this time is equal to `other`.
|
|
2424
|
+
///
|
|
2425
|
+
/// # Errors
|
|
2426
|
+
/// Throws a `TypeError` if `other` is not a valid PlainTime or string.
|
|
2427
|
+
///
|
|
2428
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/equals)
|
|
2429
|
+
#[wasm_bindgen(method, catch)]
|
|
2430
|
+
pub fn equals(this: &PlainTime, other: &JsValue) -> Result<bool, JsValue>;
|
|
539
2431
|
|
|
540
|
-
///
|
|
541
|
-
///
|
|
542
|
-
///
|
|
543
|
-
///
|
|
544
|
-
|
|
545
|
-
|
|
2432
|
+
/// The `with()` method returns a new `Temporal.PlainTime` object with some
|
|
2433
|
+
/// fields replaced by new values.
|
|
2434
|
+
///
|
|
2435
|
+
/// # Errors
|
|
2436
|
+
/// Throws a `TypeError` if `time_like` is not a valid time-like object.
|
|
2437
|
+
/// Throws a `RangeError` if values are out of range (when `overflow` is `'reject'`).
|
|
2438
|
+
///
|
|
2439
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/with)
|
|
2440
|
+
#[wasm_bindgen(method, catch)]
|
|
2441
|
+
pub fn with(
|
|
2442
|
+
this: &PlainTime,
|
|
2443
|
+
time_like: &JsValue,
|
|
2444
|
+
options: &AssignmentOptions,
|
|
2445
|
+
) -> Result<PlainTime, JsValue>;
|
|
2446
|
+
|
|
2447
|
+
/// The `add()` method returns a new `Temporal.PlainTime` object with the
|
|
2448
|
+
/// duration added to this time (wrapping around midnight if necessary).
|
|
2449
|
+
///
|
|
2450
|
+
/// # Errors
|
|
2451
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
2452
|
+
/// Throws a `RangeError` if the duration has non-zero calendar units (years, months, weeks, days).
|
|
2453
|
+
///
|
|
2454
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/add)
|
|
2455
|
+
#[wasm_bindgen(method, catch)]
|
|
2456
|
+
pub fn add(this: &PlainTime, duration: &JsValue) -> Result<PlainTime, JsValue>;
|
|
546
2457
|
|
|
547
|
-
///
|
|
548
|
-
///
|
|
549
|
-
///
|
|
550
|
-
#
|
|
551
|
-
|
|
2458
|
+
/// The `subtract()` method returns a new `Temporal.PlainTime` object with the
|
|
2459
|
+
/// duration subtracted from this time (wrapping around midnight if necessary).
|
|
2460
|
+
///
|
|
2461
|
+
/// # Errors
|
|
2462
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
2463
|
+
/// Throws a `RangeError` if the duration has non-zero calendar units (years, months, weeks, days).
|
|
2464
|
+
///
|
|
2465
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/subtract)
|
|
2466
|
+
#[wasm_bindgen(method, catch)]
|
|
2467
|
+
pub fn subtract(this: &PlainTime, duration: &JsValue) -> Result<PlainTime, JsValue>;
|
|
552
2468
|
|
|
553
|
-
|
|
554
|
-
|
|
2469
|
+
/// The `until()` method returns a `Temporal.Duration` representing the duration
|
|
2470
|
+
/// from this time until `other`.
|
|
2471
|
+
///
|
|
2472
|
+
/// # Errors
|
|
2473
|
+
/// Throws a `TypeError` if `other` is not a valid PlainTime or string.
|
|
2474
|
+
/// Throws a `RangeError` if options specify calendar units or are otherwise invalid.
|
|
2475
|
+
///
|
|
2476
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/until)
|
|
2477
|
+
#[wasm_bindgen(method, catch)]
|
|
2478
|
+
pub fn until(
|
|
2479
|
+
this: &PlainTime,
|
|
2480
|
+
other: &JsValue,
|
|
2481
|
+
options: &DifferenceOptions,
|
|
2482
|
+
) -> Result<Duration, JsValue>;
|
|
2483
|
+
|
|
2484
|
+
/// The `since()` method returns a `Temporal.Duration` representing the duration
|
|
2485
|
+
/// from `other` until this time.
|
|
2486
|
+
///
|
|
2487
|
+
/// # Errors
|
|
2488
|
+
/// Throws a `TypeError` if `other` is not a valid PlainTime or string.
|
|
2489
|
+
/// Throws a `RangeError` if options specify calendar units or are otherwise invalid.
|
|
2490
|
+
///
|
|
2491
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/since)
|
|
2492
|
+
#[wasm_bindgen(method, catch)]
|
|
2493
|
+
pub fn since(
|
|
2494
|
+
this: &PlainTime,
|
|
2495
|
+
other: &JsValue,
|
|
2496
|
+
options: &DifferenceOptions,
|
|
2497
|
+
) -> Result<Duration, JsValue>;
|
|
2498
|
+
|
|
2499
|
+
/// The `round()` method returns a new `Temporal.PlainTime` object with the
|
|
2500
|
+
/// time rounded to the given unit.
|
|
2501
|
+
///
|
|
2502
|
+
/// # Errors
|
|
2503
|
+
/// Throws a `RangeError` if `smallestUnit` is not provided or specifies calendar units,
|
|
2504
|
+
/// or if `roundingIncrement` is invalid for the unit.
|
|
2505
|
+
///
|
|
2506
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/round)
|
|
2507
|
+
#[wasm_bindgen(method, catch)]
|
|
2508
|
+
pub fn round(this: &PlainTime, round_to: &RoundToOptions) -> Result<PlainTime, JsValue>;
|
|
555
2509
|
|
|
556
|
-
///
|
|
557
|
-
///
|
|
2510
|
+
/// The `toLocaleString()` method returns a language-sensitive string representation
|
|
2511
|
+
/// of this time.
|
|
558
2512
|
///
|
|
559
|
-
///
|
|
2513
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/toLocaleString)
|
|
560
2514
|
#[wasm_bindgen(method, js_name = toLocaleString)]
|
|
561
|
-
pub fn to_locale_string(this: &PlainTime, locales: &
|
|
2515
|
+
pub fn to_locale_string(this: &PlainTime, locales: &[JsString], options: &JsValue) -> JsString;
|
|
562
2516
|
|
|
563
|
-
///
|
|
564
|
-
///
|
|
2517
|
+
/// The `toJSON()` method returns a string representation of this time
|
|
2518
|
+
/// suitable for JSON serialization.
|
|
565
2519
|
///
|
|
566
|
-
///
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
pub fn get_iso_fields(this: &PlainTime) -> JsValue;
|
|
2520
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/toJSON)
|
|
2521
|
+
#[wasm_bindgen(method, js_name = toJSON)]
|
|
2522
|
+
pub fn to_json(this: &PlainTime) -> JsString;
|
|
570
2523
|
|
|
2524
|
+
/// The `toString()` method returns an ISO 8601 string representation of this time.
|
|
2525
|
+
///
|
|
2526
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/toString)
|
|
2527
|
+
#[wasm_bindgen(method, js_name = toString)]
|
|
2528
|
+
pub fn to_js_string(this: &PlainTime, options: &ToStringPrecisionOptions) -> JsString;
|
|
2529
|
+
|
|
2530
|
+
/// The `toPlainDateTime()` method returns a `Temporal.PlainDateTime` object combining
|
|
2531
|
+
/// this time with the given date.
|
|
2532
|
+
///
|
|
2533
|
+
/// # Errors
|
|
2534
|
+
/// Throws a `TypeError` if `plain_date` is not a valid PlainDate or date-like.
|
|
2535
|
+
///
|
|
2536
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainTime/toPlainDateTime)
|
|
2537
|
+
#[wasm_bindgen(method, js_name = toPlainDateTime, catch)]
|
|
2538
|
+
pub fn to_plain_date_time(
|
|
2539
|
+
this: &PlainTime,
|
|
2540
|
+
plain_date: &JsValue,
|
|
2541
|
+
) -> Result<PlainDateTime, JsValue>;
|
|
571
2542
|
}
|
|
572
2543
|
|
|
573
2544
|
#[wasm_bindgen]
|
|
574
2545
|
extern "C" {
|
|
575
|
-
/// A Temporal.PlainYearMonth represents a particular month on the calendar. For example,
|
|
576
|
-
/// could be used to represent a particular instance of a monthly recurring event, like
|
|
577
|
-
/// June 2019 meeting".
|
|
2546
|
+
/// A `Temporal.PlainYearMonth` represents a particular month on the calendar. For example,
|
|
2547
|
+
/// it could be used to represent a particular instance of a monthly recurring event, like
|
|
2548
|
+
/// "the June 2019 meeting".
|
|
2549
|
+
///
|
|
2550
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth)
|
|
578
2551
|
#[wasm_bindgen(js_namespace = Temporal, extends = Object)]
|
|
579
2552
|
#[derive(Clone, Debug)]
|
|
580
2553
|
pub type PlainYearMonth;
|
|
581
2554
|
|
|
582
|
-
|
|
583
|
-
|
|
2555
|
+
/// The `Temporal.PlainYearMonth()` constructor creates `Temporal.PlainYearMonth` objects.
|
|
2556
|
+
///
|
|
2557
|
+
/// # Errors
|
|
2558
|
+
/// Throws a `RangeError` if the date components are out of range or form an invalid date,
|
|
2559
|
+
/// or if the calendar identifier is invalid.
|
|
2560
|
+
///
|
|
2561
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/PlainYearMonth)
|
|
2562
|
+
#[wasm_bindgen(constructor, js_namespace = Temporal, catch)]
|
|
2563
|
+
pub fn new(
|
|
2564
|
+
iso_year: i32,
|
|
2565
|
+
iso_month: u32,
|
|
2566
|
+
calendar: &str,
|
|
2567
|
+
reference_iso_day: u32,
|
|
2568
|
+
) -> Result<PlainYearMonth, JsValue>;
|
|
2569
|
+
|
|
2570
|
+
/// The `Temporal.PlainYearMonth.from()` static method creates a new `Temporal.PlainYearMonth`
|
|
2571
|
+
/// object from another value.
|
|
2572
|
+
///
|
|
2573
|
+
/// # Errors
|
|
2574
|
+
/// Throws a `TypeError` if `item` is not a valid PlainYearMonth, year-month-like object, or string.
|
|
2575
|
+
/// Throws a `RangeError` if the string is invalid or values are out of range
|
|
2576
|
+
/// (when `overflow` is `'reject'`).
|
|
2577
|
+
///
|
|
2578
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/from)
|
|
2579
|
+
#[wasm_bindgen(static_method_of = PlainYearMonth, js_namespace = Temporal, catch)]
|
|
2580
|
+
pub fn from(item: &JsValue, options: &AssignmentOptions) -> Result<PlainYearMonth, JsValue>;
|
|
2581
|
+
|
|
2582
|
+
/// The `Temporal.PlainYearMonth.compare()` static method returns -1, 0, or 1 depending
|
|
2583
|
+
/// on whether `one` comes before, is equal to, or comes after `two`.
|
|
2584
|
+
///
|
|
2585
|
+
/// # Errors
|
|
2586
|
+
/// Throws a `TypeError` if either argument is not a valid PlainYearMonth or string.
|
|
2587
|
+
///
|
|
2588
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/compare)
|
|
2589
|
+
#[wasm_bindgen(static_method_of = PlainYearMonth, js_namespace = Temporal, catch)]
|
|
2590
|
+
pub fn compare(one: &JsValue, two: &JsValue) -> Result<i32, JsValue>;
|
|
2591
|
+
|
|
2592
|
+
/// The `era` accessor property returns a calendar-specific lowercase string
|
|
2593
|
+
/// representing the era of this year-month, or `undefined` if the calendar does not use eras.
|
|
2594
|
+
///
|
|
2595
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/era)
|
|
2596
|
+
#[wasm_bindgen(method, getter, structural)]
|
|
2597
|
+
pub fn era(this: &PlainYearMonth) -> JsValue;
|
|
584
2598
|
|
|
585
|
-
|
|
586
|
-
|
|
2599
|
+
/// The `eraYear` accessor property returns a non-negative integer representing the
|
|
2600
|
+
/// year of this year-month within the era, or `undefined` if the calendar does not use eras.
|
|
2601
|
+
///
|
|
2602
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/eraYear)
|
|
2603
|
+
#[wasm_bindgen(method, getter, structural, js_name = eraYear)]
|
|
2604
|
+
pub fn era_year(this: &PlainYearMonth) -> JsValue;
|
|
587
2605
|
|
|
588
|
-
/// `year`
|
|
589
|
-
///
|
|
590
|
-
///
|
|
591
|
-
///
|
|
2606
|
+
/// The `year` accessor property returns an integer representing the number of years
|
|
2607
|
+
/// of this year-month relative to the start of a calendar-specific epoch year.
|
|
2608
|
+
///
|
|
2609
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/year)
|
|
592
2610
|
#[wasm_bindgen(method, getter, structural)]
|
|
593
2611
|
pub fn year(this: &PlainYearMonth) -> i32;
|
|
594
2612
|
|
|
595
|
-
/// `month`
|
|
596
|
-
///
|
|
597
|
-
///
|
|
598
|
-
///
|
|
599
|
-
/// of every year has month equal to the monthsInYear property. month values
|
|
600
|
-
/// start at 1, which is different from legacy Date where months are represented
|
|
601
|
-
/// by zero-based indices (0 to 11).
|
|
2613
|
+
/// The `month` accessor property returns a positive integer representing the
|
|
2614
|
+
/// 1-based month index in the year of this year-month.
|
|
2615
|
+
///
|
|
2616
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/month)
|
|
602
2617
|
#[wasm_bindgen(method, getter, structural)]
|
|
603
2618
|
pub fn month(this: &PlainYearMonth) -> u32;
|
|
604
2619
|
|
|
605
|
-
/// `monthCode`
|
|
606
|
-
///
|
|
607
|
-
///
|
|
608
|
-
/// (
|
|
609
|
-
/// is the previous month's code with with an "L" suffix appended.
|
|
610
|
-
/// Examples:
|
|
611
|
-
/// * 'M02' => February;
|
|
612
|
-
/// * 'M08L' => repeated 8th month in the Chinese calendar;
|
|
613
|
-
/// * 'M05L' => Adar I in the Hebrew calendar.
|
|
2620
|
+
/// The `monthCode` accessor property returns a calendar-specific string representing
|
|
2621
|
+
/// the month of this year-month.
|
|
2622
|
+
///
|
|
2623
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/monthCode)
|
|
614
2624
|
#[wasm_bindgen(method, getter, structural, js_name = monthCode)]
|
|
615
2625
|
pub fn month_code(this: &PlainYearMonth) -> JsString;
|
|
616
2626
|
|
|
617
|
-
///
|
|
618
|
-
///
|
|
619
|
-
///
|
|
620
|
-
///
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
pub fn era_year(this: &PlainYearMonth) -> JsValue;
|
|
624
|
-
|
|
625
|
-
/// In calendars that use eras, the era and eraYear read-only properties can be used
|
|
626
|
-
/// together to resolve an era-relative year. Both properties are undefined when using
|
|
627
|
-
/// the ISO 8601 calendar. As inputs to from or with, era and eraYear can be used instead
|
|
628
|
-
/// of year. Unlike year, eraYear may decrease as time proceeds because some
|
|
629
|
-
/// eras (like the BCE era in the Gregorian calendar) count years backwards.
|
|
630
|
-
#[wasm_bindgen(method, getter, structural)]
|
|
631
|
-
pub fn era(this: &PlainYearMonth) -> JsValue;
|
|
2627
|
+
/// The `calendarId` accessor property returns a string representing the calendar
|
|
2628
|
+
/// used to interpret the internal ISO 8601 date.
|
|
2629
|
+
///
|
|
2630
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/calendarId)
|
|
2631
|
+
#[wasm_bindgen(method, getter, structural, js_name = calendarId)]
|
|
2632
|
+
pub fn calendar_id(this: &PlainYearMonth) -> JsString;
|
|
632
2633
|
|
|
633
|
-
/// The daysInMonth
|
|
634
|
-
///
|
|
635
|
-
///
|
|
2634
|
+
/// The `daysInMonth` accessor property returns a positive integer representing the
|
|
2635
|
+
/// number of days in the month of this year-month.
|
|
2636
|
+
///
|
|
2637
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/daysInMonth)
|
|
636
2638
|
#[wasm_bindgen(method, getter, structural, js_name = daysInMonth)]
|
|
637
2639
|
pub fn days_in_month(this: &PlainYearMonth) -> u32;
|
|
638
2640
|
|
|
639
|
-
/// The daysInYear
|
|
640
|
-
///
|
|
641
|
-
///
|
|
2641
|
+
/// The `daysInYear` accessor property returns a positive integer representing the
|
|
2642
|
+
/// number of days in the year of this year-month.
|
|
2643
|
+
///
|
|
2644
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/daysInYear)
|
|
642
2645
|
#[wasm_bindgen(method, getter, structural, js_name = daysInYear)]
|
|
643
2646
|
pub fn days_in_year(this: &PlainYearMonth) -> u32;
|
|
644
2647
|
|
|
645
|
-
/// The monthsInYear
|
|
646
|
-
///
|
|
647
|
-
///
|
|
648
|
-
|
|
2648
|
+
/// The `monthsInYear` accessor property returns a positive integer representing the
|
|
2649
|
+
/// number of months in the year of this year-month.
|
|
2650
|
+
///
|
|
2651
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/monthsInYear)
|
|
2652
|
+
#[wasm_bindgen(method, getter, structural, js_name = monthsInYear)]
|
|
649
2653
|
pub fn months_in_year(this: &PlainYearMonth) -> u32;
|
|
650
2654
|
|
|
651
|
-
/// The inLeapYear
|
|
652
|
-
///
|
|
2655
|
+
/// The `inLeapYear` accessor property returns `true` if this year-month is in a leap year,
|
|
2656
|
+
/// and `false` otherwise.
|
|
2657
|
+
///
|
|
2658
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/inLeapYear)
|
|
653
2659
|
#[wasm_bindgen(method, getter, structural, js_name = inLeapYear)]
|
|
654
2660
|
pub fn in_leap_year(this: &PlainYearMonth) -> bool;
|
|
655
2661
|
|
|
656
|
-
///
|
|
657
|
-
///
|
|
658
|
-
///- `duration` (`Temporal.Duration` or value convertible to one): The duration to add.
|
|
659
|
-
///- `options` (optional object): An object with properties representing options for the addition.
|
|
660
|
-
///The following options are recognized:
|
|
661
|
-
///- `overflow` (optional string): How to deal with additions that result in out-of-range values.
|
|
662
|
-
/// Allowed values are `constrain` and `reject`.
|
|
663
|
-
/// The default is `constrain`.
|
|
664
|
-
///
|
|
665
|
-
///**Returns:** a new `Temporal.PlainYearMonth` object which is the date indicated by `date` plus `duration`.
|
|
666
|
-
///
|
|
667
|
-
///This method adds `duration` to `date`, returning a date that is in the future relative to `date`.
|
|
2662
|
+
/// The `equals()` method returns `true` if this year-month is equivalent to `other`.
|
|
668
2663
|
///
|
|
669
|
-
///
|
|
670
|
-
///
|
|
2664
|
+
/// # Errors
|
|
2665
|
+
/// Throws a `TypeError` if `other` is not a valid PlainYearMonth or string.
|
|
671
2666
|
///
|
|
672
|
-
///
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
2667
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/equals)
|
|
2668
|
+
#[wasm_bindgen(method, catch)]
|
|
2669
|
+
pub fn equals(this: &PlainYearMonth, other: &JsValue) -> Result<bool, JsValue>;
|
|
2670
|
+
|
|
2671
|
+
/// The `with()` method returns a new `Temporal.PlainYearMonth` object with some
|
|
2672
|
+
/// fields replaced by new values.
|
|
678
2673
|
///
|
|
679
|
-
///
|
|
2674
|
+
/// # Errors
|
|
2675
|
+
/// Throws a `TypeError` if `info` is not a valid year-month-like object.
|
|
2676
|
+
/// Throws a `RangeError` if values are out of range (when `overflow` is `'reject'`).
|
|
680
2677
|
///
|
|
681
|
-
///
|
|
682
|
-
#[wasm_bindgen(method)]
|
|
683
|
-
pub fn
|
|
2678
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/with)
|
|
2679
|
+
#[wasm_bindgen(method, catch)]
|
|
2680
|
+
pub fn with(
|
|
2681
|
+
this: &PlainYearMonth,
|
|
2682
|
+
info: &JsValue,
|
|
2683
|
+
options: &AssignmentOptions,
|
|
2684
|
+
) -> Result<PlainYearMonth, JsValue>;
|
|
684
2685
|
|
|
685
|
-
///
|
|
686
|
-
|
|
687
|
-
///- `options` (optional object): An object with properties representing options for the subtraction.
|
|
688
|
-
///The following options are recognized:
|
|
689
|
-
///- `overflow` (string): How to deal with subtractions that result in out-of-range values.
|
|
690
|
-
/// Allowed values are `constrain` and `reject`.
|
|
691
|
-
/// The default is `constrain`.
|
|
2686
|
+
/// The `add()` method returns a new `Temporal.PlainYearMonth` object with the
|
|
2687
|
+
/// duration added to this year-month.
|
|
692
2688
|
///
|
|
693
|
-
|
|
2689
|
+
/// # Errors
|
|
2690
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
2691
|
+
/// Throws a `RangeError` if the result is out of range (when `overflow` is `'reject'`).
|
|
694
2692
|
///
|
|
695
|
-
///
|
|
2693
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/add)
|
|
2694
|
+
#[wasm_bindgen(method, catch)]
|
|
2695
|
+
pub fn add(
|
|
2696
|
+
this: &PlainYearMonth,
|
|
2697
|
+
duration: &JsValue,
|
|
2698
|
+
options: &ArithmeticOptions,
|
|
2699
|
+
) -> Result<PlainYearMonth, JsValue>;
|
|
2700
|
+
|
|
2701
|
+
/// The `subtract()` method returns a new `Temporal.PlainYearMonth` object with the
|
|
2702
|
+
/// duration subtracted from this year-month.
|
|
696
2703
|
///
|
|
697
|
-
///
|
|
698
|
-
///
|
|
2704
|
+
/// # Errors
|
|
2705
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
2706
|
+
/// Throws a `RangeError` if the result is out of range (when `overflow` is `'reject'`).
|
|
699
2707
|
///
|
|
700
|
-
///
|
|
701
|
-
|
|
702
|
-
|
|
2708
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/subtract)
|
|
2709
|
+
#[wasm_bindgen(method, catch)]
|
|
2710
|
+
pub fn subtract(
|
|
2711
|
+
this: &PlainYearMonth,
|
|
2712
|
+
duration: &JsValue,
|
|
2713
|
+
options: &ArithmeticOptions,
|
|
2714
|
+
) -> Result<PlainYearMonth, JsValue>;
|
|
2715
|
+
|
|
2716
|
+
/// The `until()` method returns a `Temporal.Duration` representing the duration
|
|
2717
|
+
/// from this year-month until `other`.
|
|
703
2718
|
///
|
|
704
|
-
|
|
705
|
-
|
|
2719
|
+
/// # Errors
|
|
2720
|
+
/// Throws a `TypeError` if `other` is not a valid PlainYearMonth or string.
|
|
2721
|
+
/// Throws a `RangeError` if dates have different calendars or options are invalid.
|
|
706
2722
|
///
|
|
707
|
-
///
|
|
2723
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/until)
|
|
2724
|
+
#[wasm_bindgen(method, catch)]
|
|
2725
|
+
pub fn until(
|
|
2726
|
+
this: &PlainYearMonth,
|
|
2727
|
+
other: &JsValue,
|
|
2728
|
+
options: &DifferenceOptions,
|
|
2729
|
+
) -> Result<Duration, JsValue>;
|
|
2730
|
+
|
|
2731
|
+
/// The `since()` method returns a `Temporal.Duration` representing the duration
|
|
2732
|
+
/// from `other` until this year-month.
|
|
708
2733
|
///
|
|
709
|
-
///
|
|
2734
|
+
/// # Errors
|
|
2735
|
+
/// Throws a `TypeError` if `other` is not a valid PlainYearMonth or string.
|
|
2736
|
+
/// Throws a `RangeError` if dates have different calendars or options are invalid.
|
|
710
2737
|
///
|
|
711
|
-
|
|
712
|
-
|
|
2738
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/since)
|
|
2739
|
+
#[wasm_bindgen(method, catch)]
|
|
2740
|
+
pub fn since(
|
|
713
2741
|
this: &PlainYearMonth,
|
|
714
|
-
|
|
715
|
-
options: &
|
|
716
|
-
) ->
|
|
2742
|
+
other: &JsValue,
|
|
2743
|
+
options: &DifferenceOptions,
|
|
2744
|
+
) -> Result<Duration, JsValue>;
|
|
717
2745
|
|
|
718
|
-
///
|
|
719
|
-
///
|
|
720
|
-
/// Temporal types.
|
|
2746
|
+
/// The `toPlainDate()` method returns a `Temporal.PlainDate` object representing
|
|
2747
|
+
/// this year-month with the given day.
|
|
721
2748
|
///
|
|
722
|
-
///
|
|
723
|
-
///
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
/// create a new Temporal.PlainDate object.
|
|
730
|
-
#[wasm_bindgen(method, js_name = toString)]
|
|
731
|
-
pub fn to_string(this: &PlainYearMonth) -> JsString;
|
|
2749
|
+
/// # Errors
|
|
2750
|
+
/// Throws a `TypeError` if `day` is not a valid object with a `day` property.
|
|
2751
|
+
/// Throws a `RangeError` if the day doesn't exist in this year-month.
|
|
2752
|
+
///
|
|
2753
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/toPlainDate)
|
|
2754
|
+
#[wasm_bindgen(method, js_name = toPlainDate, catch)]
|
|
2755
|
+
pub fn to_plain_date(this: &PlainYearMonth, day: &JsValue) -> Result<PlainDate, JsValue>;
|
|
732
2756
|
|
|
733
|
-
///
|
|
734
|
-
///
|
|
2757
|
+
/// The `toLocaleString()` method returns a language-sensitive string representation
|
|
2758
|
+
/// of this year-month.
|
|
735
2759
|
///
|
|
736
|
-
///
|
|
2760
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/toLocaleString)
|
|
737
2761
|
#[wasm_bindgen(method, js_name = toLocaleString)]
|
|
738
2762
|
pub fn to_locale_string(
|
|
739
2763
|
this: &PlainYearMonth,
|
|
740
|
-
locales: &
|
|
2764
|
+
locales: &[JsString],
|
|
741
2765
|
options: &JsValue,
|
|
742
2766
|
) -> JsString;
|
|
743
2767
|
|
|
744
|
-
///
|
|
745
|
-
///
|
|
2768
|
+
/// The `toJSON()` method returns a string representation of this year-month
|
|
2769
|
+
/// suitable for JSON serialization.
|
|
746
2770
|
///
|
|
747
|
-
///
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
pub fn get_iso_fields(this: &PlainYearMonth) -> JsValue;
|
|
2771
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/toJSON)
|
|
2772
|
+
#[wasm_bindgen(method, js_name = toJSON)]
|
|
2773
|
+
pub fn to_json(this: &PlainYearMonth) -> JsString;
|
|
751
2774
|
|
|
2775
|
+
/// The `toString()` method returns an ISO 8601 string representation of this year-month.
|
|
2776
|
+
///
|
|
2777
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainYearMonth/toString)
|
|
2778
|
+
#[wasm_bindgen(method, js_name = toString)]
|
|
2779
|
+
pub fn to_js_string(this: &PlainYearMonth, options: &ShowCalendarOptions) -> JsString;
|
|
752
2780
|
}
|
|
753
2781
|
|
|
754
2782
|
#[wasm_bindgen]
|
|
755
2783
|
extern "C" {
|
|
756
|
-
/// A
|
|
757
|
-
///
|
|
2784
|
+
/// A `Temporal.PlainMonthDay` represents a particular day on the calendar, but without
|
|
2785
|
+
/// a year. For example, it could be used to represent a yearly recurring event, like
|
|
2786
|
+
/// "Bastille Day is on the 14th of July."
|
|
2787
|
+
///
|
|
2788
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay)
|
|
758
2789
|
#[wasm_bindgen(js_namespace = Temporal, extends = Object)]
|
|
759
2790
|
#[derive(Clone, Debug)]
|
|
760
2791
|
pub type PlainMonthDay;
|
|
761
2792
|
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
///
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
///
|
|
778
|
-
///
|
|
779
|
-
///
|
|
780
|
-
///
|
|
2793
|
+
/// The `Temporal.PlainMonthDay()` constructor creates `Temporal.PlainMonthDay` objects.
|
|
2794
|
+
///
|
|
2795
|
+
/// # Errors
|
|
2796
|
+
/// Throws a `RangeError` if the date components are out of range or form an invalid date,
|
|
2797
|
+
/// or if the calendar identifier is invalid.
|
|
2798
|
+
///
|
|
2799
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/PlainMonthDay)
|
|
2800
|
+
#[wasm_bindgen(constructor, js_namespace = Temporal, catch)]
|
|
2801
|
+
pub fn new(
|
|
2802
|
+
iso_month: u32,
|
|
2803
|
+
iso_day: u32,
|
|
2804
|
+
calendar: &str,
|
|
2805
|
+
reference_iso_year: i32,
|
|
2806
|
+
) -> Result<PlainMonthDay, JsValue>;
|
|
2807
|
+
|
|
2808
|
+
/// The `Temporal.PlainMonthDay.from()` static method creates a new `Temporal.PlainMonthDay`
|
|
2809
|
+
/// object from another value.
|
|
2810
|
+
///
|
|
2811
|
+
/// # Errors
|
|
2812
|
+
/// Throws a `TypeError` if `item` is not a valid PlainMonthDay, month-day-like object, or string.
|
|
2813
|
+
/// Throws a `RangeError` if the string is invalid or values are out of range
|
|
2814
|
+
/// (when `overflow` is `'reject'`).
|
|
2815
|
+
///
|
|
2816
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/from)
|
|
2817
|
+
#[wasm_bindgen(static_method_of = PlainMonthDay, js_namespace = Temporal, catch)]
|
|
2818
|
+
pub fn from(item: &JsValue, options: &AssignmentOptions) -> Result<PlainMonthDay, JsValue>;
|
|
2819
|
+
|
|
2820
|
+
/// The `monthCode` accessor property returns a calendar-specific string representing
|
|
2821
|
+
/// the month of this month-day.
|
|
2822
|
+
///
|
|
2823
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/monthCode)
|
|
781
2824
|
#[wasm_bindgen(method, getter, structural, js_name = monthCode)]
|
|
782
2825
|
pub fn month_code(this: &PlainMonthDay) -> JsString;
|
|
783
2826
|
|
|
784
|
-
/// day
|
|
2827
|
+
/// The `day` accessor property returns a positive integer representing the
|
|
2828
|
+
/// day of the month.
|
|
2829
|
+
///
|
|
2830
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/day)
|
|
785
2831
|
#[wasm_bindgen(method, getter, structural)]
|
|
786
2832
|
pub fn day(this: &PlainMonthDay) -> u32;
|
|
787
2833
|
|
|
788
|
-
///
|
|
789
|
-
///
|
|
790
|
-
/// Temporal types.
|
|
2834
|
+
/// The `calendarId` accessor property returns a string representing the calendar
|
|
2835
|
+
/// used to interpret the internal ISO 8601 date.
|
|
791
2836
|
///
|
|
792
|
-
///
|
|
793
|
-
|
|
2837
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/calendarId)
|
|
2838
|
+
#[wasm_bindgen(method, getter, structural, js_name = calendarId)]
|
|
2839
|
+
pub fn calendar_id(this: &PlainMonthDay) -> JsString;
|
|
2840
|
+
|
|
2841
|
+
/// The `equals()` method returns `true` if this month-day is equivalent to `other`.
|
|
794
2842
|
///
|
|
795
|
-
///
|
|
796
|
-
///
|
|
797
|
-
|
|
798
|
-
|
|
2843
|
+
/// # Errors
|
|
2844
|
+
/// Throws a `TypeError` if `other` is not a valid PlainMonthDay or string.
|
|
2845
|
+
///
|
|
2846
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/equals)
|
|
2847
|
+
#[wasm_bindgen(method, catch)]
|
|
2848
|
+
pub fn equals(this: &PlainMonthDay, other: &JsValue) -> Result<bool, JsValue>;
|
|
799
2849
|
|
|
800
|
-
///
|
|
801
|
-
///
|
|
802
|
-
///
|
|
803
|
-
#
|
|
804
|
-
|
|
2850
|
+
/// The `with()` method returns a new `Temporal.PlainMonthDay` object with some
|
|
2851
|
+
/// fields replaced by new values.
|
|
2852
|
+
///
|
|
2853
|
+
/// # Errors
|
|
2854
|
+
/// Throws a `TypeError` if `info` is not a valid month-day-like object.
|
|
2855
|
+
/// Throws a `RangeError` if values are out of range (when `overflow` is `'reject'`).
|
|
2856
|
+
///
|
|
2857
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/with)
|
|
2858
|
+
#[wasm_bindgen(method, catch)]
|
|
2859
|
+
pub fn with(
|
|
2860
|
+
this: &PlainMonthDay,
|
|
2861
|
+
info: &JsValue,
|
|
2862
|
+
options: &AssignmentOptions,
|
|
2863
|
+
) -> Result<PlainMonthDay, JsValue>;
|
|
2864
|
+
|
|
2865
|
+
/// The `toPlainDate()` method returns a `Temporal.PlainDate` object representing
|
|
2866
|
+
/// this month-day in the given year.
|
|
2867
|
+
///
|
|
2868
|
+
/// # Errors
|
|
2869
|
+
/// Throws a `TypeError` if `year` is not a valid object with a `year` property.
|
|
2870
|
+
/// Throws a `RangeError` if the date doesn't exist in the given year (e.g., Feb 29 in non-leap year).
|
|
2871
|
+
///
|
|
2872
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/toPlainDate)
|
|
2873
|
+
#[wasm_bindgen(method, js_name = toPlainDate, catch)]
|
|
2874
|
+
pub fn to_plain_date(this: &PlainMonthDay, year: &JsValue) -> Result<PlainDate, JsValue>;
|
|
805
2875
|
|
|
806
|
-
///
|
|
807
|
-
///
|
|
2876
|
+
/// The `toLocaleString()` method returns a language-sensitive string representation
|
|
2877
|
+
/// of this month-day.
|
|
808
2878
|
///
|
|
809
|
-
///
|
|
2879
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/toLocaleString)
|
|
810
2880
|
#[wasm_bindgen(method, js_name = toLocaleString)]
|
|
811
|
-
pub fn to_locale_string(
|
|
812
|
-
|
|
2881
|
+
pub fn to_locale_string(
|
|
2882
|
+
this: &PlainMonthDay,
|
|
2883
|
+
locales: &[JsString],
|
|
2884
|
+
options: &JsValue,
|
|
2885
|
+
) -> JsString;
|
|
813
2886
|
|
|
814
|
-
///
|
|
815
|
-
///
|
|
2887
|
+
/// The `toJSON()` method returns a string representation of this month-day
|
|
2888
|
+
/// suitable for JSON serialization.
|
|
816
2889
|
///
|
|
817
|
-
///
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
pub fn get_iso_fields(this: &PlainMonthDay) -> JsValue;
|
|
2890
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/toJSON)
|
|
2891
|
+
#[wasm_bindgen(method, js_name = toJSON)]
|
|
2892
|
+
pub fn to_json(this: &PlainMonthDay) -> JsString;
|
|
821
2893
|
|
|
2894
|
+
/// The `toString()` method returns an ISO 8601 string representation of this month-day.
|
|
2895
|
+
///
|
|
2896
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainMonthDay/toString)
|
|
2897
|
+
#[wasm_bindgen(method, js_name = toString)]
|
|
2898
|
+
pub fn to_js_string(this: &PlainMonthDay, options: &ShowCalendarOptions) -> JsString;
|
|
822
2899
|
}
|
|
823
2900
|
|
|
824
2901
|
#[wasm_bindgen]
|
|
825
2902
|
extern "C" {
|
|
2903
|
+
/// A `Temporal.PlainDate` represents a calendar date without time or time zone information.
|
|
2904
|
+
/// For example, it could be used to represent an event on a calendar which happens during
|
|
2905
|
+
/// the whole day no matter which time zone it's happening in.
|
|
2906
|
+
///
|
|
2907
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate)
|
|
826
2908
|
#[wasm_bindgen(js_namespace = Temporal, extends = Object)]
|
|
827
2909
|
#[derive(Clone, Debug)]
|
|
828
2910
|
pub type PlainDate;
|
|
829
2911
|
|
|
830
|
-
|
|
831
|
-
|
|
2912
|
+
/// The `Temporal.PlainDate()` constructor creates `Temporal.PlainDate` objects.
|
|
2913
|
+
///
|
|
2914
|
+
/// # Errors
|
|
2915
|
+
/// Throws a `RangeError` if the date components are out of range or form an invalid date,
|
|
2916
|
+
/// or if the calendar identifier is invalid.
|
|
2917
|
+
///
|
|
2918
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/PlainDate)
|
|
2919
|
+
#[wasm_bindgen(constructor, js_namespace = Temporal, catch)]
|
|
2920
|
+
pub fn new(
|
|
2921
|
+
iso_year: i32,
|
|
2922
|
+
iso_month: u32,
|
|
2923
|
+
iso_day: u32,
|
|
2924
|
+
calendar: &str,
|
|
2925
|
+
) -> Result<PlainDate, JsValue>;
|
|
2926
|
+
|
|
2927
|
+
/// The `Temporal.PlainDate.from()` static method creates a new `Temporal.PlainDate`
|
|
2928
|
+
/// object from another value.
|
|
2929
|
+
///
|
|
2930
|
+
/// # Errors
|
|
2931
|
+
/// Throws a `TypeError` if `item` is not a valid PlainDate, date-like object, or string.
|
|
2932
|
+
/// Throws a `RangeError` if the string is invalid or values are out of range
|
|
2933
|
+
/// (when `overflow` is `'reject'`).
|
|
2934
|
+
///
|
|
2935
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/from)
|
|
2936
|
+
#[wasm_bindgen(static_method_of = PlainDate, js_namespace = Temporal, catch)]
|
|
2937
|
+
pub fn from(item: &JsValue, options: &AssignmentOptions) -> Result<PlainDate, JsValue>;
|
|
2938
|
+
|
|
2939
|
+
/// The `Temporal.PlainDate.compare()` static method returns -1, 0, or 1 depending
|
|
2940
|
+
/// on whether `one` comes before, is equal to, or comes after `two`.
|
|
2941
|
+
///
|
|
2942
|
+
/// # Errors
|
|
2943
|
+
/// Throws a `TypeError` if either argument is not a valid PlainDate or string.
|
|
2944
|
+
///
|
|
2945
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/compare)
|
|
2946
|
+
#[wasm_bindgen(static_method_of = PlainDate, js_namespace = Temporal, catch)]
|
|
2947
|
+
pub fn compare(one: &JsValue, two: &JsValue) -> Result<i32, JsValue>;
|
|
832
2948
|
|
|
833
|
-
|
|
834
|
-
|
|
2949
|
+
/// The `era` accessor property returns a calendar-specific lowercase string
|
|
2950
|
+
/// representing the era of this date, or `undefined` if the calendar does not use eras.
|
|
2951
|
+
///
|
|
2952
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/era)
|
|
2953
|
+
#[wasm_bindgen(method, getter, structural)]
|
|
2954
|
+
pub fn era(this: &PlainDate) -> JsValue;
|
|
835
2955
|
|
|
836
|
-
|
|
837
|
-
|
|
2956
|
+
/// The `eraYear` accessor property returns a non-negative integer representing the
|
|
2957
|
+
/// year of this date within the era, or `undefined` if the calendar does not use eras.
|
|
2958
|
+
///
|
|
2959
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/eraYear)
|
|
2960
|
+
#[wasm_bindgen(method, getter, structural, js_name = eraYear)]
|
|
2961
|
+
pub fn era_year(this: &PlainDate) -> JsValue;
|
|
838
2962
|
|
|
839
|
-
/// `year`
|
|
840
|
-
///
|
|
841
|
-
///
|
|
842
|
-
///
|
|
2963
|
+
/// The `year` accessor property returns an integer representing the number of years
|
|
2964
|
+
/// of this date relative to the start of a calendar-specific epoch year.
|
|
2965
|
+
///
|
|
2966
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/year)
|
|
843
2967
|
#[wasm_bindgen(method, getter, structural)]
|
|
844
2968
|
pub fn year(this: &PlainDate) -> i32;
|
|
845
2969
|
|
|
846
|
-
/// `month`
|
|
847
|
-
///
|
|
848
|
-
///
|
|
849
|
-
///
|
|
850
|
-
/// of every year has month equal to the monthsInYear property. month values
|
|
851
|
-
/// start at 1, which is different from legacy Date where months are represented
|
|
852
|
-
/// by zero-based indices (0 to 11).
|
|
2970
|
+
/// The `month` accessor property returns a positive integer representing the
|
|
2971
|
+
/// 1-based month index in the year of this date.
|
|
2972
|
+
///
|
|
2973
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/month)
|
|
853
2974
|
#[wasm_bindgen(method, getter, structural)]
|
|
854
2975
|
pub fn month(this: &PlainDate) -> u32;
|
|
855
2976
|
|
|
856
|
-
/// `monthCode`
|
|
857
|
-
///
|
|
858
|
-
///
|
|
859
|
-
/// (
|
|
860
|
-
/// is the previous month's code with with an "L" suffix appended.
|
|
861
|
-
/// Examples:
|
|
862
|
-
/// * 'M02' => February;
|
|
863
|
-
/// * 'M08L' => repeated 8th month in the Chinese calendar;
|
|
864
|
-
/// * 'M05L' => Adar I in the Hebrew calendar.
|
|
2977
|
+
/// The `monthCode` accessor property returns a calendar-specific string representing
|
|
2978
|
+
/// the month of this date.
|
|
2979
|
+
///
|
|
2980
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/monthCode)
|
|
865
2981
|
#[wasm_bindgen(method, getter, structural, js_name = monthCode)]
|
|
866
2982
|
pub fn month_code(this: &PlainDate) -> JsString;
|
|
867
2983
|
|
|
868
|
-
/// day
|
|
2984
|
+
/// The `day` accessor property returns a positive integer representing the
|
|
2985
|
+
/// 1-based day index in the month of this date.
|
|
2986
|
+
///
|
|
2987
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/day)
|
|
869
2988
|
#[wasm_bindgen(method, getter, structural)]
|
|
870
2989
|
pub fn day(this: &PlainDate) -> u32;
|
|
871
2990
|
|
|
872
|
-
///
|
|
873
|
-
///
|
|
874
|
-
///
|
|
875
|
-
///
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
pub fn era_year(this: &PlainDate) -> JsValue;
|
|
879
|
-
|
|
880
|
-
/// In calendars that use eras, the era and eraYear read-only properties can be used
|
|
881
|
-
/// together to resolve an era-relative year. Both properties are undefined when using
|
|
882
|
-
/// the ISO 8601 calendar. As inputs to from or with, era and eraYear can be used instead
|
|
883
|
-
/// of year. Unlike year, eraYear may decrease as time proceeds because some
|
|
884
|
-
/// eras (like the BCE era in the Gregorian calendar) count years backwards.
|
|
885
|
-
#[wasm_bindgen(method, getter, structural)]
|
|
886
|
-
pub fn era(this: &PlainDate) -> JsValue;
|
|
2991
|
+
/// The `calendarId` accessor property returns a string representing the calendar
|
|
2992
|
+
/// used to interpret the internal ISO 8601 date.
|
|
2993
|
+
///
|
|
2994
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/calendarId)
|
|
2995
|
+
#[wasm_bindgen(method, getter, structural, js_name = calendarId)]
|
|
2996
|
+
pub fn calendar_id(this: &PlainDate) -> JsString;
|
|
887
2997
|
|
|
888
|
-
/// The dayOfWeek
|
|
889
|
-
///
|
|
890
|
-
///
|
|
2998
|
+
/// The `dayOfWeek` accessor property returns a positive integer representing the
|
|
2999
|
+
/// day of the week of this date (1 = Monday through 7 = Sunday for ISO 8601).
|
|
3000
|
+
///
|
|
3001
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/dayOfWeek)
|
|
891
3002
|
#[wasm_bindgen(method, getter, structural, js_name = dayOfWeek)]
|
|
892
3003
|
pub fn day_of_week(this: &PlainDate) -> u32;
|
|
893
3004
|
|
|
894
|
-
/// The dayOfYear
|
|
895
|
-
///
|
|
896
|
-
///
|
|
3005
|
+
/// The `dayOfYear` accessor property returns a positive integer representing the
|
|
3006
|
+
/// 1-based day index of this date in the year.
|
|
3007
|
+
///
|
|
3008
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/dayOfYear)
|
|
897
3009
|
#[wasm_bindgen(method, getter, structural, js_name = dayOfYear)]
|
|
898
3010
|
pub fn day_of_year(this: &PlainDate) -> u32;
|
|
899
3011
|
|
|
900
|
-
/// The weekOfYear
|
|
901
|
-
///
|
|
902
|
-
///
|
|
3012
|
+
/// The `weekOfYear` accessor property returns a positive integer representing the
|
|
3013
|
+
/// 1-based week index in the `yearOfWeek` of this date, or `undefined` if the
|
|
3014
|
+
/// calendar does not have a well-defined week system.
|
|
3015
|
+
///
|
|
3016
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/weekOfYear)
|
|
903
3017
|
#[wasm_bindgen(method, getter, structural, js_name = weekOfYear)]
|
|
904
|
-
pub fn week_of_year(this: &PlainDate) ->
|
|
3018
|
+
pub fn week_of_year(this: &PlainDate) -> JsValue;
|
|
905
3019
|
|
|
906
|
-
/// The
|
|
907
|
-
///
|
|
908
|
-
///
|
|
3020
|
+
/// The `yearOfWeek` accessor property returns an integer representing the year
|
|
3021
|
+
/// to be paired with `weekOfYear`, or `undefined` if the calendar does not have
|
|
3022
|
+
/// a well-defined week system.
|
|
3023
|
+
///
|
|
3024
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/yearOfWeek)
|
|
3025
|
+
#[wasm_bindgen(method, getter, structural, js_name = yearOfWeek)]
|
|
3026
|
+
pub fn year_of_week(this: &PlainDate) -> JsValue;
|
|
3027
|
+
|
|
3028
|
+
/// The `daysInWeek` accessor property returns a positive integer representing the
|
|
3029
|
+
/// number of days in the week of this date.
|
|
3030
|
+
///
|
|
3031
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/daysInWeek)
|
|
909
3032
|
#[wasm_bindgen(method, getter, structural, js_name = daysInWeek)]
|
|
910
3033
|
pub fn days_in_week(this: &PlainDate) -> u32;
|
|
911
3034
|
|
|
912
|
-
/// The daysInMonth
|
|
913
|
-
///
|
|
914
|
-
///
|
|
3035
|
+
/// The `daysInMonth` accessor property returns a positive integer representing the
|
|
3036
|
+
/// number of days in the month of this date.
|
|
3037
|
+
///
|
|
3038
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/daysInMonth)
|
|
915
3039
|
#[wasm_bindgen(method, getter, structural, js_name = daysInMonth)]
|
|
916
3040
|
pub fn days_in_month(this: &PlainDate) -> u32;
|
|
917
3041
|
|
|
918
|
-
/// The daysInYear
|
|
919
|
-
///
|
|
920
|
-
///
|
|
3042
|
+
/// The `daysInYear` accessor property returns a positive integer representing the
|
|
3043
|
+
/// number of days in the year of this date.
|
|
3044
|
+
///
|
|
3045
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/daysInYear)
|
|
921
3046
|
#[wasm_bindgen(method, getter, structural, js_name = daysInYear)]
|
|
922
3047
|
pub fn days_in_year(this: &PlainDate) -> u32;
|
|
923
3048
|
|
|
924
|
-
/// The monthsInYear
|
|
925
|
-
///
|
|
926
|
-
///
|
|
927
|
-
|
|
3049
|
+
/// The `monthsInYear` accessor property returns a positive integer representing the
|
|
3050
|
+
/// number of months in the year of this date.
|
|
3051
|
+
///
|
|
3052
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/monthsInYear)
|
|
3053
|
+
#[wasm_bindgen(method, getter, structural, js_name = monthsInYear)]
|
|
928
3054
|
pub fn months_in_year(this: &PlainDate) -> u32;
|
|
929
3055
|
|
|
930
|
-
/// The inLeapYear
|
|
931
|
-
///
|
|
3056
|
+
/// The `inLeapYear` accessor property returns `true` if this date is in a leap year,
|
|
3057
|
+
/// and `false` otherwise.
|
|
3058
|
+
///
|
|
3059
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/inLeapYear)
|
|
932
3060
|
#[wasm_bindgen(method, getter, structural, js_name = inLeapYear)]
|
|
933
3061
|
pub fn in_leap_year(this: &PlainDate) -> bool;
|
|
934
3062
|
|
|
935
|
-
///
|
|
936
|
-
///
|
|
937
|
-
#
|
|
938
|
-
|
|
3063
|
+
/// The `equals()` method returns `true` if this date is equivalent to `other`.
|
|
3064
|
+
///
|
|
3065
|
+
/// # Errors
|
|
3066
|
+
/// Throws a `TypeError` if `other` is not a valid PlainDate or string.
|
|
3067
|
+
///
|
|
3068
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/equals)
|
|
3069
|
+
#[wasm_bindgen(method, catch)]
|
|
3070
|
+
pub fn equals(this: &PlainDate, other: &JsValue) -> Result<bool, JsValue>;
|
|
939
3071
|
|
|
940
|
-
///
|
|
3072
|
+
/// The `with()` method returns a new `Temporal.PlainDate` object with some
|
|
3073
|
+
/// fields replaced by new values.
|
|
941
3074
|
///
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
///
|
|
945
|
-
///- `overflow` (optional string): How to deal with additions that result in out-of-range values.
|
|
946
|
-
/// Allowed values are `constrain` and `reject`.
|
|
947
|
-
/// The default is `constrain`.
|
|
3075
|
+
/// # Errors
|
|
3076
|
+
/// Throws a `TypeError` if `info` is not a valid date-like object.
|
|
3077
|
+
/// Throws a `RangeError` if values are out of range (when `overflow` is `'reject'`).
|
|
948
3078
|
///
|
|
949
|
-
|
|
3079
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/with)
|
|
3080
|
+
#[wasm_bindgen(method, catch)]
|
|
3081
|
+
pub fn with(
|
|
3082
|
+
this: &PlainDate,
|
|
3083
|
+
info: &JsValue,
|
|
3084
|
+
options: &AssignmentOptions,
|
|
3085
|
+
) -> Result<PlainDate, JsValue>;
|
|
3086
|
+
|
|
3087
|
+
/// The `withCalendar()` method returns a new `Temporal.PlainDate` object with
|
|
3088
|
+
/// the calendar replaced.
|
|
950
3089
|
///
|
|
951
|
-
///
|
|
3090
|
+
/// # Errors
|
|
3091
|
+
/// Throws a `RangeError` if the calendar identifier is invalid.
|
|
952
3092
|
///
|
|
953
|
-
///
|
|
954
|
-
|
|
3093
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/withCalendar)
|
|
3094
|
+
#[wasm_bindgen(method, js_name = withCalendar, catch)]
|
|
3095
|
+
pub fn with_calendar(this: &PlainDate, calendar: &str) -> Result<PlainDate, JsValue>;
|
|
3096
|
+
|
|
3097
|
+
/// The `add()` method returns a new `Temporal.PlainDate` object with the
|
|
3098
|
+
/// duration added to this date.
|
|
955
3099
|
///
|
|
956
|
-
///
|
|
957
|
-
///
|
|
958
|
-
///
|
|
3100
|
+
/// # Errors
|
|
3101
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
3102
|
+
/// Throws a `RangeError` if the result is out of range (when `overflow` is `'reject'`).
|
|
959
3103
|
///
|
|
960
|
-
|
|
961
|
-
|
|
3104
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/add)
|
|
3105
|
+
#[wasm_bindgen(method, catch)]
|
|
3106
|
+
pub fn add(
|
|
3107
|
+
this: &PlainDate,
|
|
3108
|
+
duration: &JsValue,
|
|
3109
|
+
options: &ArithmeticOptions,
|
|
3110
|
+
) -> Result<PlainDate, JsValue>;
|
|
3111
|
+
|
|
3112
|
+
/// The `subtract()` method returns a new `Temporal.PlainDate` object with the
|
|
3113
|
+
/// duration subtracted from this date.
|
|
962
3114
|
///
|
|
963
|
-
///
|
|
3115
|
+
/// # Errors
|
|
3116
|
+
/// Throws a `TypeError` if `duration` is not a valid Duration or duration-like.
|
|
3117
|
+
/// Throws a `RangeError` if the result is out of range (when `overflow` is `'reject'`).
|
|
964
3118
|
///
|
|
965
|
-
///
|
|
966
|
-
#[wasm_bindgen(method)]
|
|
967
|
-
pub fn
|
|
3119
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/subtract)
|
|
3120
|
+
#[wasm_bindgen(method, catch)]
|
|
3121
|
+
pub fn subtract(
|
|
3122
|
+
this: &PlainDate,
|
|
3123
|
+
duration: &JsValue,
|
|
3124
|
+
options: &ArithmeticOptions,
|
|
3125
|
+
) -> Result<PlainDate, JsValue>;
|
|
968
3126
|
|
|
969
|
-
///
|
|
970
|
-
|
|
971
|
-
///- `options` (optional object): An object with properties representing options for the subtraction.
|
|
972
|
-
///The following options are recognized:
|
|
973
|
-
///- `overflow` (string): How to deal with subtractions that result in out-of-range values.
|
|
974
|
-
/// Allowed values are `constrain` and `reject`.
|
|
975
|
-
/// The default is `constrain`.
|
|
3127
|
+
/// The `until()` method returns a `Temporal.Duration` representing the duration
|
|
3128
|
+
/// from this date until `other`.
|
|
976
3129
|
///
|
|
977
|
-
|
|
3130
|
+
/// # Errors
|
|
3131
|
+
/// Throws a `TypeError` if `other` is not a valid PlainDate or string.
|
|
3132
|
+
/// Throws a `RangeError` if dates have different calendars or options are invalid.
|
|
978
3133
|
///
|
|
979
|
-
///
|
|
3134
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/until)
|
|
3135
|
+
#[wasm_bindgen(method, catch)]
|
|
3136
|
+
pub fn until(
|
|
3137
|
+
this: &PlainDate,
|
|
3138
|
+
other: &JsValue,
|
|
3139
|
+
options: &DifferenceOptions,
|
|
3140
|
+
) -> Result<Duration, JsValue>;
|
|
3141
|
+
|
|
3142
|
+
/// The `since()` method returns a `Temporal.Duration` representing the duration
|
|
3143
|
+
/// from `other` until this date.
|
|
980
3144
|
///
|
|
981
|
-
///
|
|
982
|
-
///
|
|
3145
|
+
/// # Errors
|
|
3146
|
+
/// Throws a `TypeError` if `other` is not a valid PlainDate or string.
|
|
3147
|
+
/// Throws a `RangeError` if dates have different calendars or options are invalid.
|
|
983
3148
|
///
|
|
984
|
-
///
|
|
985
|
-
|
|
986
|
-
|
|
3149
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/since)
|
|
3150
|
+
#[wasm_bindgen(method, catch)]
|
|
3151
|
+
pub fn since(
|
|
3152
|
+
this: &PlainDate,
|
|
3153
|
+
other: &JsValue,
|
|
3154
|
+
options: &DifferenceOptions,
|
|
3155
|
+
) -> Result<Duration, JsValue>;
|
|
3156
|
+
|
|
3157
|
+
/// The `toPlainDateTime()` method returns a `Temporal.PlainDateTime` object representing
|
|
3158
|
+
/// this date at the given time (or midnight if not provided).
|
|
987
3159
|
///
|
|
988
|
-
|
|
989
|
-
|
|
3160
|
+
/// # Errors
|
|
3161
|
+
/// Throws a `TypeError` if `time` is provided but is not a valid PlainTime or time-like.
|
|
990
3162
|
///
|
|
991
|
-
///
|
|
3163
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/toPlainDateTime)
|
|
3164
|
+
#[wasm_bindgen(method, js_name = toPlainDateTime, catch)]
|
|
3165
|
+
pub fn to_plain_date_time(this: &PlainDate, time: &JsValue) -> Result<PlainDateTime, JsValue>;
|
|
3166
|
+
|
|
3167
|
+
/// The `toZonedDateTime()` method returns a `Temporal.ZonedDateTime` object representing
|
|
3168
|
+
/// this date at the given time in the given time zone.
|
|
992
3169
|
///
|
|
993
|
-
///
|
|
3170
|
+
/// # Errors
|
|
3171
|
+
/// Throws a `TypeError` if `item` is not a valid time zone info object.
|
|
3172
|
+
/// Throws a `RangeError` if the time zone identifier is invalid or with `disambiguation: reject`
|
|
3173
|
+
/// during ambiguous times.
|
|
994
3174
|
///
|
|
995
|
-
|
|
996
|
-
|
|
3175
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/toZonedDateTime)
|
|
3176
|
+
#[wasm_bindgen(method, js_name = toZonedDateTime, catch)]
|
|
3177
|
+
pub fn to_zoned_date_time(this: &PlainDate, item: &JsValue) -> Result<ZonedDateTime, JsValue>;
|
|
997
3178
|
|
|
998
|
-
///
|
|
999
|
-
///
|
|
1000
|
-
/// Temporal types.
|
|
3179
|
+
/// The `toPlainYearMonth()` method returns a `Temporal.PlainYearMonth` object representing
|
|
3180
|
+
/// the year and month of this date.
|
|
1001
3181
|
///
|
|
1002
|
-
///
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
/// Note that this function will return false if the two objects have different calendar
|
|
1006
|
-
/// properties, even if the actual dates are equal.
|
|
1007
|
-
#[wasm_bindgen(method)]
|
|
1008
|
-
pub fn equals(this: &PlainDate, other: &PlainDate) -> bool;
|
|
3182
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/toPlainYearMonth)
|
|
3183
|
+
#[wasm_bindgen(method, js_name = toPlainYearMonth)]
|
|
3184
|
+
pub fn to_plain_year_month(this: &PlainDate) -> PlainYearMonth;
|
|
1009
3185
|
|
|
1010
|
-
///
|
|
1011
|
-
///
|
|
1012
|
-
///
|
|
1013
|
-
|
|
1014
|
-
|
|
3186
|
+
/// The `toPlainMonthDay()` method returns a `Temporal.PlainMonthDay` object representing
|
|
3187
|
+
/// the month and day of this date.
|
|
3188
|
+
///
|
|
3189
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/toPlainMonthDay)
|
|
3190
|
+
#[wasm_bindgen(method, js_name = toPlainMonthDay)]
|
|
3191
|
+
pub fn to_plain_month_day(this: &PlainDate) -> PlainMonthDay;
|
|
1015
3192
|
|
|
1016
|
-
///
|
|
1017
|
-
///
|
|
3193
|
+
/// The `toLocaleString()` method returns a language-sensitive string representation
|
|
3194
|
+
/// of this date.
|
|
1018
3195
|
///
|
|
1019
|
-
///
|
|
3196
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/toLocaleString)
|
|
1020
3197
|
#[wasm_bindgen(method, js_name = toLocaleString)]
|
|
1021
|
-
pub fn to_locale_string(this: &PlainDate, locales: &
|
|
3198
|
+
pub fn to_locale_string(this: &PlainDate, locales: &[JsString], options: &JsValue) -> JsString;
|
|
1022
3199
|
|
|
1023
|
-
///
|
|
1024
|
-
///
|
|
3200
|
+
/// The `toJSON()` method returns a string representation of this date
|
|
3201
|
+
/// suitable for JSON serialization.
|
|
1025
3202
|
///
|
|
1026
|
-
///
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
pub fn get_iso_fields(this: &PlainDate) -> JsValue;
|
|
3203
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/toJSON)
|
|
3204
|
+
#[wasm_bindgen(method, js_name = toJSON)]
|
|
3205
|
+
pub fn to_json(this: &PlainDate) -> JsString;
|
|
1030
3206
|
|
|
3207
|
+
/// The `toString()` method returns an ISO 8601 string representation of this date.
|
|
3208
|
+
///
|
|
3209
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/PlainDate/toString)
|
|
3210
|
+
#[wasm_bindgen(method, js_name = toString)]
|
|
3211
|
+
pub fn to_js_string(this: &PlainDate, options: &ShowCalendarOptions) -> JsString;
|
|
1031
3212
|
}
|
|
1032
3213
|
|
|
3214
|
+
/// The `Temporal.Now` object has several methods which give information about
|
|
3215
|
+
/// the current date, time, and time zone.
|
|
3216
|
+
///
|
|
3217
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now)
|
|
1033
3218
|
pub mod Now {
|
|
1034
3219
|
use super::*;
|
|
1035
3220
|
|
|
1036
3221
|
#[wasm_bindgen]
|
|
1037
3222
|
extern "C" {
|
|
3223
|
+
/// The `Temporal.Now.instant()` static method returns the current exact time
|
|
3224
|
+
/// as a `Temporal.Instant`.
|
|
3225
|
+
///
|
|
3226
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/instant)
|
|
1038
3227
|
#[wasm_bindgen(js_namespace = ["Temporal", "Now"])]
|
|
1039
3228
|
pub fn instant() -> Instant;
|
|
1040
3229
|
|
|
1041
|
-
#[wasm_bindgen(js_namespace = ["Temporal", "Now"], js_name =
|
|
1042
|
-
|
|
3230
|
+
#[wasm_bindgen(js_namespace = ["Temporal", "Now"], js_name = zonedDateTimeISO, catch)]
|
|
3231
|
+
fn zoned_date_time_iso_internal(time_zone: &JsValue) -> Result<ZonedDateTime, JsValue>;
|
|
3232
|
+
|
|
3233
|
+
#[wasm_bindgen(js_namespace = ["Temporal", "Now"], js_name = plainDateTimeISO, catch)]
|
|
3234
|
+
fn plain_date_time_iso_internal(time_zone: &JsValue) -> Result<PlainDateTime, JsValue>;
|
|
3235
|
+
|
|
3236
|
+
#[wasm_bindgen(js_namespace = ["Temporal", "Now"], js_name = plainDateISO, catch)]
|
|
3237
|
+
fn plain_date_iso_internal(time_zone: &JsValue) -> Result<PlainDate, JsValue>;
|
|
3238
|
+
|
|
3239
|
+
#[wasm_bindgen(js_namespace = ["Temporal", "Now"], js_name = plainTimeISO, catch)]
|
|
3240
|
+
fn plain_time_iso_internal(time_zone: &JsValue) -> Result<PlainTime, JsValue>;
|
|
3241
|
+
|
|
3242
|
+
/// The `Temporal.Now.timeZoneId()` static method returns the identifier of
|
|
3243
|
+
/// the system's current time zone.
|
|
3244
|
+
///
|
|
3245
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/timeZoneId)
|
|
3246
|
+
#[wasm_bindgen(js_namespace = ["Temporal", "Now"], js_name = timeZoneId)]
|
|
3247
|
+
pub fn time_zone_id() -> JsString;
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
/// Returns the current date and time as a `Temporal.ZonedDateTime` in the
|
|
3251
|
+
/// ISO 8601 calendar and the system's current time zone.
|
|
3252
|
+
///
|
|
3253
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/zonedDateTimeISO)
|
|
3254
|
+
#[inline]
|
|
3255
|
+
pub fn zoned_date_time_iso() -> ZonedDateTime {
|
|
3256
|
+
// SAFETY: undefined is always a valid time zone input (uses system timezone)
|
|
3257
|
+
zoned_date_time_iso_internal(&JsValue::UNDEFINED).unwrap()
|
|
3258
|
+
}
|
|
3259
|
+
|
|
3260
|
+
/// Returns the current date and time as a `Temporal.ZonedDateTime` in the
|
|
3261
|
+
/// ISO 8601 calendar and the specified time zone (from a `ZonedDateTime`).
|
|
3262
|
+
///
|
|
3263
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/zonedDateTimeISO)
|
|
3264
|
+
#[inline]
|
|
3265
|
+
pub fn zoned_date_time_iso_with_timezone(time_zone: &ZonedDateTime) -> ZonedDateTime {
|
|
3266
|
+
// SAFETY: A valid ZonedDateTime always has a valid time zone
|
|
3267
|
+
zoned_date_time_iso_internal(time_zone.as_ref()).unwrap()
|
|
3268
|
+
}
|
|
3269
|
+
|
|
3270
|
+
/// Returns the current date and time as a `Temporal.ZonedDateTime` in the
|
|
3271
|
+
/// ISO 8601 calendar and the specified time zone (as a string identifier).
|
|
3272
|
+
///
|
|
3273
|
+
/// # Errors
|
|
3274
|
+
/// Throws a `RangeError` if the time zone identifier is invalid.
|
|
3275
|
+
///
|
|
3276
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/zonedDateTimeISO)
|
|
3277
|
+
#[inline]
|
|
3278
|
+
pub fn zoned_date_time_iso_with_timezone_str(
|
|
3279
|
+
time_zone: &str,
|
|
3280
|
+
) -> Result<ZonedDateTime, JsValue> {
|
|
3281
|
+
zoned_date_time_iso_internal(&JsValue::from_str(time_zone))
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3284
|
+
/// Returns the current date and time as a `Temporal.PlainDateTime` in the
|
|
3285
|
+
/// ISO 8601 calendar and the system's current time zone.
|
|
3286
|
+
///
|
|
3287
|
+
/// Note that `Temporal.PlainDateTime` does not persist the time zone.
|
|
3288
|
+
/// For most time-zone-related use cases, `zoned_date_time_iso()` is recommended.
|
|
3289
|
+
///
|
|
3290
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/plainDateTimeISO)
|
|
3291
|
+
#[inline]
|
|
3292
|
+
pub fn plain_date_time_iso() -> PlainDateTime {
|
|
3293
|
+
// SAFETY: undefined is always a valid time zone input (uses system timezone)
|
|
3294
|
+
plain_date_time_iso_internal(&JsValue::UNDEFINED).unwrap()
|
|
3295
|
+
}
|
|
3296
|
+
|
|
3297
|
+
/// Returns the current date and time as a `Temporal.PlainDateTime` in the
|
|
3298
|
+
/// ISO 8601 calendar and the specified time zone (from a `ZonedDateTime`).
|
|
3299
|
+
///
|
|
3300
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/plainDateTimeISO)
|
|
3301
|
+
#[inline]
|
|
3302
|
+
pub fn plain_date_time_iso_with_timezone(time_zone: &ZonedDateTime) -> PlainDateTime {
|
|
3303
|
+
// SAFETY: A valid ZonedDateTime always has a valid time zone
|
|
3304
|
+
plain_date_time_iso_internal(time_zone.as_ref()).unwrap()
|
|
3305
|
+
}
|
|
3306
|
+
|
|
3307
|
+
/// Returns the current date and time as a `Temporal.PlainDateTime` in the
|
|
3308
|
+
/// ISO 8601 calendar and the specified time zone (as a string identifier).
|
|
3309
|
+
///
|
|
3310
|
+
/// # Errors
|
|
3311
|
+
/// Throws a `RangeError` if the time zone identifier is invalid.
|
|
3312
|
+
///
|
|
3313
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/plainDateTimeISO)
|
|
3314
|
+
#[inline]
|
|
3315
|
+
pub fn plain_date_time_iso_with_timezone_str(
|
|
3316
|
+
time_zone: &str,
|
|
3317
|
+
) -> Result<PlainDateTime, JsValue> {
|
|
3318
|
+
plain_date_time_iso_internal(&JsValue::from_str(time_zone))
|
|
3319
|
+
}
|
|
3320
|
+
|
|
3321
|
+
/// Returns the current date as a `Temporal.PlainDate` in the ISO 8601
|
|
3322
|
+
/// calendar and the system's current time zone.
|
|
3323
|
+
///
|
|
3324
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/plainDateISO)
|
|
3325
|
+
#[inline]
|
|
3326
|
+
pub fn plain_date_iso() -> PlainDate {
|
|
3327
|
+
// SAFETY: undefined is always a valid time zone input (uses system timezone)
|
|
3328
|
+
plain_date_iso_internal(&JsValue::UNDEFINED).unwrap()
|
|
3329
|
+
}
|
|
1043
3330
|
|
|
1044
|
-
|
|
1045
|
-
|
|
3331
|
+
/// Returns the current date as a `Temporal.PlainDate` in the ISO 8601
|
|
3332
|
+
/// calendar and the specified time zone (from a `ZonedDateTime`).
|
|
3333
|
+
///
|
|
3334
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/plainDateISO)
|
|
3335
|
+
#[inline]
|
|
3336
|
+
pub fn plain_date_iso_with_timezone(time_zone: &ZonedDateTime) -> PlainDate {
|
|
3337
|
+
// SAFETY: A valid ZonedDateTime always has a valid time zone
|
|
3338
|
+
plain_date_iso_internal(time_zone.as_ref()).unwrap()
|
|
3339
|
+
}
|
|
1046
3340
|
|
|
1047
|
-
|
|
1048
|
-
|
|
3341
|
+
/// Returns the current date as a `Temporal.PlainDate` in the ISO 8601
|
|
3342
|
+
/// calendar and the specified time zone (as a string identifier).
|
|
3343
|
+
///
|
|
3344
|
+
/// # Errors
|
|
3345
|
+
/// Throws a `RangeError` if the time zone identifier is invalid.
|
|
3346
|
+
///
|
|
3347
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/plainDateISO)
|
|
3348
|
+
#[inline]
|
|
3349
|
+
pub fn plain_date_iso_with_timezone_str(time_zone: &str) -> Result<PlainDate, JsValue> {
|
|
3350
|
+
plain_date_iso_internal(&JsValue::from_str(time_zone))
|
|
3351
|
+
}
|
|
1049
3352
|
|
|
1050
|
-
|
|
1051
|
-
|
|
3353
|
+
/// Returns the current time as a `Temporal.PlainTime` in the ISO 8601
|
|
3354
|
+
/// calendar and the system's current time zone.
|
|
3355
|
+
///
|
|
3356
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/plainTimeISO)
|
|
3357
|
+
#[inline]
|
|
3358
|
+
pub fn plain_time_iso() -> PlainTime {
|
|
3359
|
+
// SAFETY: undefined is always a valid time zone input (uses system timezone)
|
|
3360
|
+
plain_time_iso_internal(&JsValue::UNDEFINED).unwrap()
|
|
3361
|
+
}
|
|
1052
3362
|
|
|
1053
|
-
|
|
1054
|
-
|
|
3363
|
+
/// Returns the current time as a `Temporal.PlainTime` in the ISO 8601
|
|
3364
|
+
/// calendar and the specified time zone (from a `ZonedDateTime`).
|
|
3365
|
+
///
|
|
3366
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/plainTimeISO)
|
|
3367
|
+
#[inline]
|
|
3368
|
+
pub fn plain_time_iso_with_timezone(time_zone: &ZonedDateTime) -> PlainTime {
|
|
3369
|
+
// SAFETY: A valid ZonedDateTime always has a valid time zone
|
|
3370
|
+
plain_time_iso_internal(time_zone.as_ref()).unwrap()
|
|
3371
|
+
}
|
|
1055
3372
|
|
|
3373
|
+
/// Returns the current time as a `Temporal.PlainTime` in the ISO 8601
|
|
3374
|
+
/// calendar and the specified time zone (as a string identifier).
|
|
3375
|
+
///
|
|
3376
|
+
/// # Errors
|
|
3377
|
+
/// Throws a `RangeError` if the time zone identifier is invalid.
|
|
3378
|
+
///
|
|
3379
|
+
/// [MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Temporal/Now/plainTimeISO)
|
|
3380
|
+
#[inline]
|
|
3381
|
+
pub fn plain_time_iso_with_timezone_str(time_zone: &str) -> Result<PlainTime, JsValue> {
|
|
3382
|
+
plain_time_iso_internal(&JsValue::from_str(time_zone))
|
|
1056
3383
|
}
|
|
1057
3384
|
}
|