Debian Codegraph @

third_party/rust/time/src/format_description/mod.rs

raw
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
10 mod borrowed_format_item;
11 mod component;
12 pub mod modifier;
13 #[cfg(feature = "alloc")]
14 mod owned_format_item;
15 #[cfg(feature = "alloc")]
16 mod parse;
17
18 pub use borrowed_format_item::BorrowedFormatItem;
19 #[allow(deprecated)]
20 pub use borrowed_format_item::FormatItem;
21 #[cfg(feature = "alloc")]
22 pub use owned_format_item::OwnedFormatItem;
23
24 pub use self::component::Component;
25 #[cfg(feature = "alloc")]
26 pub use self::parse::{parse, parse_borrowed, parse_owned};
27
28 /// Well-known formats, typically standards.
29 pub 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 }