Skip to main content

Module modifier

Module modifier 

Source
Available on crate features formatting or parsing only.
Expand description

Various modifiers for components.

Macros§

if_pub 🔒
Generate the provided code if and only if pub is present.
impl_const_default 🔒
Implement Default for the given type. This also generates an inherent implementation of a default method that is const fn, permitting the default value to be used in const contexts.

Structs§

CalendarYearCenturyExtendedRange
Year of the date. Only the century is included (i.e. all digits except the last two), the calendar year is used, and the range of years supported is ±999,999.
CalendarYearCenturyStandardRange
Year of the date. Only the century is included (i.e. all digits except the last two), the calendar year is used, and the range of years supported is ±9,999.
CalendarYearFullExtendedRange
Year of the date. All digits are included, the calendar year is used, and the range of years supported is ±999,999.
CalendarYearFullStandardRange
Year of the date. All digits are included, the calendar year is used, and the range of years supported is ±9,999.
CalendarYearLastTwo
Year of the date. Only the last two digits are included, and the calendar year is used.
Day
Day of the month.
End
The end of input.
HourDeprecated
Hour of the day.
Hour12
Hour of the day using a 12-hour clock.
Hour24
Hour of the day using a 24-hour clock.
Ignore
Ignore some number of bytes.
IsoYearCenturyExtendedRange
Year of the date. Only the century is included (i.e. all digits except the last two), the ISO week-numbering year is used, and the range of years supported is ±999,999.
IsoYearCenturyStandardRange
Year of the date. Only the century is included (i.e. all digits except the last two), the ISO week-numbering year is used, and the range of years supported is ±9,999.
IsoYearFullExtendedRange
Year of the date. All digits are included, the ISO week-numbering year is used, and the range of years supported is ±999,999.
IsoYearFullStandardRange
Year of the date. All digits are included, the ISO week-numbering year is used, and the range of supported is ±9,999.
IsoYearLastTwo
Year of the date. Only the last two digits are included, and the ISO week-numbering year is used.
Minute
Minute within the hour.
MonthDeprecated
Month of the year.
MonthLong
Month of the year using the long form of the month name (e.g. “January”).
MonthNumerical
Month of the year using a numerical representation (e.g. “1” for January).
MonthShort
Month of the year using the short form of the month name (e.g. “Jan”).
OffsetHour
Hour of the UTC offset.
OffsetMinute
Minute within the hour of the UTC offset.
OffsetSecond
Second within the minute of the UTC offset.
Ordinal
Ordinal day of the year.
Period
AM/PM part of the time.
Second
Second within the minute.
Subsecond
Subsecond within the second.
UnixTimestampDeprecated
A Unix timestamp.
UnixTimestampMicrosecond
A Unix timestamp in microseconds.
UnixTimestampMillisecond
A Unix timestamp in milliseconds.
UnixTimestampNanosecond
A Unix timestamp in nanoseconds.
UnixTimestampSecond
A Unix timestamp in seconds.
WeekNumberDeprecated
Week within the year.
WeekNumberIso
Week within the year using the ISO week calendar.
WeekNumberMonday
Week within the calendar year.
WeekNumberSunday
Week within the calendar year.
WeekdayDeprecated
Day of the week.
WeekdayLong
Day of the week using the long form of the weekday (e.g. “Monday”).
WeekdayMonday
Day of the week using a numerical representation with Monday as the first day of the week.
WeekdayShort
Day of the week using the short form of the weekday (e.g. “Mon”).
WeekdaySunday
Day of the week using a numerical representation with Sunday as the first day of the week.
YearDeprecated
Year of the date.

Enums§

MonthReprDeprecated
The representation of a month.
Padding
Type of padding to ensure a minimum width.
SubsecondDigits
The number of digits present in a subsecond representation.
TrailingInput
Whether trailing input after the declared end is permitted.
UnixTimestampPrecisionDeprecated
The precision of a Unix timestamp.
WeekNumberReprDeprecated
The representation used for the week number.
WeekdayReprDeprecated
The representation used for the day of the week.
YearRangeDeprecated
The range of years that are supported.
YearReprDeprecated
The representation used for a year value.