time/interop/mod.rs
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//! [`UtcDateTime`](crate::UtcDateTime), and [`SystemTime`](std::time::SystemTime). Partial
5//! interoperability is present with [`js_sys::Date`]. Note that
6//! [`PrimitiveDateTime`](crate::PrimitiveDateTime) is not interoperable with any of these types due
7//! 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))]
17mod 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))]
23mod js_sys_date_utcdatetime;
24#[cfg(feature = "std")]
25mod offsetdatetime_systemtime;
26mod offsetdatetime_utcdatetime;
27#[cfg(feature = "std")]
28mod utcdatetime_systemtime;