espera/
lib.rs

1// espera::lib
2//
3//! Time management.
4//
5
6// warnings
7#![warn(clippy::all)]
8#![allow(
9    clippy::needless_return,
10    clippy::module_inception,
11    non_upper_case_globals
12)]
13// environment
14#![cfg_attr(not(feature = "std"), no_std)]
15#![cfg_attr(feature = "safe", forbid(unsafe_code))]
16#![cfg_attr(feature = "nightly", feature(doc_cfg))]
17#[cfg(feature = "alloc")]
18extern crate alloc;
19
20// safeguards
21#[cfg(all(feature = "std", feature = "no_std"))]
22compile_error!("You can't enable the `std` and `no_std` features at the same time.");
23#[cfg(all(feature = "safe", feature = "unsafe"))]
24compile_error!("You can't enable the `safe` and `unsafe` features at the same time.");
25// deprecated
26devela::deprecate_feature![old: "no-std", new: "no_std", since: "0.3.0"];
27
28pub mod calendar;
29pub mod error;
30pub mod fmt;
31pub mod time;
32
33#[cfg(feature = "std")]
34#[cfg_attr(feature = "nightly", doc(cfg(feature = "std")))]
35pub mod control;
36
37/// All items are reexported here.
38pub mod all {
39    #[doc(inline)]
40    pub use super::{
41        calendar::{Month, Weekday},
42        error::*,
43        fmt::*,
44        time::*,
45    };
46
47    #[doc(inline)]
48    #[cfg(feature = "std")]
49    pub use super::control::*;
50}