toml_datetime/
lib.rs

1//! A [TOML]-compatible datetime type
2//!
3//! [TOML]: https://github.com/toml-lang/toml
4
5#![cfg_attr(docsrs, feature(doc_auto_cfg))]
6#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
7#![warn(missing_docs)]
8#![warn(clippy::std_instead_of_core)]
9#![warn(clippy::std_instead_of_alloc)]
10// Makes rustc abort compilation if there are any unsafe blocks in the crate.
11// Presence of this annotation is picked up by tools such as cargo-geiger
12// and lets them ensure that there is indeed no unsafe code as opposed to
13// something they couldn't detect (e.g. unsafe added via macro expansion, etc).
14#![forbid(unsafe_code)]
15#![warn(clippy::print_stderr)]
16#![warn(clippy::print_stdout)]
17
18#[cfg(feature = "alloc")]
19#[allow(unused_extern_crates)]
20extern crate alloc;
21
22mod datetime;
23
24#[cfg(feature = "serde")]
25#[cfg(feature = "alloc")]
26pub mod de;
27#[cfg(feature = "serde")]
28#[cfg(feature = "alloc")]
29pub mod ser;
30
31pub use crate::datetime::Date;
32pub use crate::datetime::Datetime;
33pub use crate::datetime::DatetimeParseError;
34pub use crate::datetime::Offset;
35pub use crate::datetime::Time;
36
37#[doc = include_str!("../README.md")]
38#[cfg(doctest)]
39pub struct ReadmeDoctests;