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.