Debian Codegraph @

debian/rust-vendor/time/src/interop/mod.rs

raw
1 //! Comparison, arithmetic, and conversion between various types in `time` and the standard library.
2 //!
3 //! Currently, full interoperability is present between [`OffsetDateTime`](crate::OffsetDateTime),
4 //! [`Timestamp`](crate::Timestamp), [`UtcDateTime`](crate::UtcDateTime), and
5 //! [`SystemTime`](std::time::SystemTime). Partial interoperability is present with
6 //! [`js_sys::Date`]. Note that [`PlainDateTime`](crate::PlainDateTime) is not interoperable with
7 //! any of these types due to the lack of an associated UTC offset.
8
9 // Module names should have the two types sorted in alphabetical order. This avoids any question
10 // of which type should be the "primary" type in the module name.
11
12 #[cfg(all(
13 target_family = "wasm",
14 not(any(target_os = "emscripten", target_os = "wasi")),
15 feature = "wasm-bindgen"
16 ))]
17 mod js_sys_date_offsetdatetime;
18 #[cfg(all(
19 target_family = "wasm",
20 not(any(target_os = "emscripten", target_os = "wasi")),
21 feature = "wasm-bindgen"
22 ))]
23 mod js_sys_date_timestamp;
24 #[cfg(all(
25 target_family = "wasm",
26 not(any(target_os = "emscripten", target_os = "wasi")),
27 feature = "wasm-bindgen"
28 ))]
29 mod js_sys_date_utcdatetime;
30 #[cfg(feature = "std")]
31 mod offsetdatetime_systemtime;
32 mod offsetdatetime_timestamp;
33 mod offsetdatetime_utcdatetime;
34 #[cfg(feature = "std")]
35 mod systemdatetime_timestamp;
36 mod timestamp_utcdatetime;
37 #[cfg(feature = "std")]
38 mod utcdatetime_systemtime;