#![allow(
non_snake_case,
clippy::module_inception,
clippy::missing_safety_doc,
clippy::needless_doctest_main,
clippy::upper_case_acronyms
)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(all(feature = "alloc", feature = "nightly"), feature(allocator_api))]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/scattered-systems/.github/main/assets/logo.png",
html_favicon_url = "https://raw.githubusercontent.com/scattered-systems/.github/main/assets/favicon.ico"
)]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(not(any(feature = "alloc", feature = "std")))]
compile_error!(
"Either feature \"alloc\" or feature \"std\" must be enabled for the `time` crate to compile."
);
#[doc(inline)]
pub use self::{
epoch::Epoch,
error::{Error, Result},
timestamp::Timestamp,
traits::*,
};
#[doc(inline)]
#[cfg(feature = "std")]
pub use self::utils::*;
pub mod epoch;
pub mod error;
pub mod timestamp;
#[doc(hidden)]
pub mod datetime;
#[macro_use]
pub(crate) mod macros {
#[macro_use]
pub mod seal;
}
pub mod traits {
#[doc(inline)]
pub use self::prelude::*;
mod now;
mod raw_timestamp;
mod temporal;
mod prelude {
#[doc(inline)]
pub use super::now::*;
#[doc(inline)]
pub use super::raw_timestamp::*;
#[doc(hidden)]
pub use super::temporal::*;
}
}
pub mod utils {
#[doc(inline)]
#[allow(unused_imports)]
pub use self::prelude::*;
#[cfg(feature = "alloc")]
mod impl_alloc;
#[cfg(feature = "std")]
mod impl_std;
#[allow(unused_imports)]
mod prelude {
#[cfg(feature = "alloc")]
pub use super::impl_alloc::*;
#[cfg(feature = "std")]
pub use super::impl_std::*;
}
}
#[doc(hidden)]
pub mod prelude {
pub use crate::epoch::Epoch;
pub use crate::timestamp::Timestamp;
pub use crate::traits::*;
#[cfg(feature = "std")]
pub use crate::utils::*;
}