Enum Fixed
enum Fixed
Fixed-format item types.
They have their own rules of formatting and parsing. Otherwise noted, they print in the specified cases but parse case-insensitively.
Variants
-
ShortMonthName Abbreviated month names.
Prints a three-letter-long name in the title case, reads the same name in any case.
-
LongMonthName Full month names.
Prints a full name in the title case, reads either a short or full name in any case.
-
ShortWeekdayName Abbreviated day of the week names.
Prints a three-letter-long name in the title case, reads the same name in any case.
-
LongWeekdayName Full day of the week names.
Prints a full name in the title case, reads either a short or full name in any case.
-
LowerAmPm AM/PM.
Prints in lower case, reads in any case.
-
UpperAmPm AM/PM.
Prints in upper case, reads in any case.
-
Nanosecond An optional dot plus one or more digits for left-aligned nanoseconds. May print nothing, 3, 6 or 9 digits according to the available accuracy. See also
Numeric::Nanosecond.-
Nanosecond3 Same as
Nanosecondbut the accuracy is fixed to 3.-
Nanosecond6 Same as
Nanosecondbut the accuracy is fixed to 6.-
Nanosecond9 Same as
Nanosecondbut the accuracy is fixed to 9.-
TimezoneName Timezone name.
It does not support parsing, its use in the parser is an immediate failure.
-
TimezoneOffsetColon Offset from the local time to UTC (
+09:00or-04:00or+00:00).In the parser, the colon can be omitted and/or surrounded with any amount of whitespace. The offset is limited from
-24:00to+24:00, which is the same asFixedOffset's range.-
TimezoneOffsetDoubleColon Offset from the local time to UTC with seconds (
+09:00:00or-04:00:00or+00:00:00).In the parser, the colon can be omitted and/or surrounded with any amount of whitespace. The offset is limited from
-24:00:00to+24:00:00, which is the same asFixedOffset's range.-
TimezoneOffsetTripleColon Offset from the local time to UTC without minutes (
+09or-04or+00).In the parser, the colon can be omitted and/or surrounded with any amount of whitespace. The offset is limited from
-24to+24, which is the same asFixedOffset's range.-
TimezoneOffsetColonZ Offset from the local time to UTC (
+09:00or-04:00orZ).In the parser, the colon can be omitted and/or surrounded with any amount of whitespace, and
Zcan be either in upper case or in lower case. The offset is limited from-24:00to+24:00, which is the same asFixedOffset's range.-
TimezoneOffset Same as
TimezoneOffsetColonbut prints no colon. Parsing allows an optional colon.-
TimezoneOffsetZ Same as
TimezoneOffsetColonZbut prints no colon. Parsing allows an optional colon.-
RFC2822 RFC 2822 date and time syntax. Commonly used for email and MIME date and time.
-
RFC3339 RFC 3339 & ISO 8601 date and time syntax.
-
Internal(InternalFixed) Internal uses only.
This item exists so that one can add additional internal-only formatting without breaking major compatibility (as enum variants cannot be selectively private).
Implementations
impl Clone for Fixed
fn clone(self: &Self) -> Fixed
impl Debug for Fixed
fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result
impl Eq for Fixed
impl Freeze for Fixed
impl Hash for Fixed
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl PartialEq for Fixed
fn eq(self: &Self, other: &Fixed) -> bool
impl RefUnwindSafe for Fixed
impl Send for Fixed
impl StructuralPartialEq for Fixed
impl Sync for Fixed
impl Unpin for Fixed
impl UnwindSafe for Fixed
impl<T> Any for Fixed
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Fixed
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Fixed
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Fixed
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Fixed
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Fixed
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Fixed
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Fixed
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Fixed
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>