| 1 |
//! A [TOML]-compatible datetime type |
| 2 |
//! |
| 3 |
//! [TOML]: https://github.com/toml-lang/toml |
| 4 |
|
| 5 |
#![cfg_attr(docsrs, feature(doc_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)] |
| 20 |
extern crate alloc; |
| 21 |
|
| 22 |
mod datetime; |
| 23 |
|
| 24 |
#[cfg(feature = "serde")] |
| 25 |
#[cfg(feature = "alloc")] |
| 26 |
pub mod de; |
| 27 |
#[cfg(feature = "serde")] |
| 28 |
#[cfg(feature = "alloc")] |
| 29 |
pub mod ser; |
| 30 |
|
| 31 |
pub use crate::datetime::Date; |
| 32 |
pub use crate::datetime::Datetime; |
| 33 |
pub use crate::datetime::DatetimeParseError; |
| 34 |
pub use crate::datetime::Offset; |
| 35 |
pub use crate::datetime::Time; |
| 36 |
|
| 37 |
#[doc = include_str!("../README.md")] |
| 38 |
#[cfg(doctest)] |
| 39 |
pub struct ReadmeDoctests; |