Available on (crate features
formatting
or parsing
) and crate feature alloc
only.Expand description
Typed, validated representation of a parsed format description.
Macros§
- component_
definition 🔒 - Declare the
Component
struct. - modifier 🔒
- Declare the various modifiers.
- target_
ty 🔒 - Get the target type for a given enum.
- target_
value 🔒 - Get the target value for a given enum.
Structs§
- Day 🔒
- End 🔒
- Hour 🔒
- Ignore 🔒
- Minute 🔒
- Month 🔒
- Offset
Hour 🔒 - Offset
Minute 🔒 - Offset
Second 🔒 - Ordinal 🔒
- Period 🔒
- Second 🔒
- Subsecond 🔒
- Unix
Timestamp 🔒 - Week
Number 🔒 - Weekday 🔒
- Year 🔒
Enums§
- Component 🔒
- Hour
Base 🔒 - Item 🔒
- A description of how to format and parse one part of a type.
- Month
Case 🔒Sensitive - Month
Repr 🔒 - Padding 🔒
- Period
Case 🔒 - Period
Case 🔒Sensitive - Sign
Behavior 🔒 - Subsecond
Digits 🔒 - Unix
Timestamp 🔒Precision - Week
Number 🔒Repr - Weekday
Case 🔒Sensitive - Weekday
OneIndexed 🔒 - Weekday
Repr 🔒 - Year
Base 🔒 - Year
Range 🔒 - Year
Repr 🔒
Functions§
- component_
from_ 🔒ast - Parse a component from the AST, given its name and modifiers.
- parse 🔒
- Parse an AST iterator into a sequence of format items.
- parse_
from_ 🔒modifier_ value - Parse a modifier value using
FromStr
. Requires the modifier value to be valid UTF-8.