time/format_description/
mod.rs

1//! Description of how types should be formatted and parsed.
2//!
3//! The formatted value will be output to the provided writer. Format descriptions can be
4//! [well-known](crate::format_description::well_known) or obtained by using the
5//! [`format_description!`](crate::macros::format_description) macro or a function listed below.
6//!
7//! For examples, see the implementors of [Formattable](crate::formatting::Formattable),
8//! e.g. [`well_known::Rfc3339`].
9
10mod borrowed_format_item;
11mod component;
12pub mod modifier;
13#[cfg(feature = "alloc")]
14mod owned_format_item;
15#[cfg(feature = "alloc")]
16mod parse;
17
18pub use borrowed_format_item::BorrowedFormatItem;
19#[allow(deprecated)]
20pub use borrowed_format_item::FormatItem;
21#[cfg(feature = "alloc")]
22pub use owned_format_item::OwnedFormatItem;
23
24pub use self::component::Component;
25#[cfg(feature = "alloc")]
26pub use self::parse::{parse, parse_borrowed, parse_owned};
27
28/// Well-known formats, typically standards.
29pub mod well_known {
30    pub mod iso8601;
31    mod rfc2822;
32    mod rfc3339;
33
34    #[doc(inline)]
35    pub use iso8601::Iso8601;
36    pub use rfc2822::Rfc2822;
37    pub use rfc3339::Rfc3339;
38}