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#[doc(hidden)]
20#[deprecated(since = "0.3.37", note = "use `BorrowedFormatItem` for clarity")]
21pub use borrowed_format_item::BorrowedFormatItem as FormatItem;
22#[cfg(feature = "alloc")]
23pub use owned_format_item::OwnedFormatItem;
24
25pub use self::component::Component;
26#[cfg(feature = "alloc")]
27pub use self::parse::{
28    parse, parse_borrowed, parse_owned, parse_strftime_borrowed, parse_strftime_owned,
29};
30
31/// Well-known formats, typically standards.
32pub mod well_known {
33    pub mod iso8601;
34    mod rfc2822;
35    mod rfc3339;
36
37    #[doc(inline)]
38    pub use iso8601::Iso8601;
39    pub use rfc2822::Rfc2822;
40    pub use rfc3339::Rfc3339;
41}