Enum HourCycle Copy item path Source #[non_exhaustive]
pub enum HourCycle {
H12,
H23,
H11,
Clock12,
Clock24,
}Expand description A Unicode Hour Cycle Identifier defines the preferred time cycle. Specifying “hc” in a locale identifier overrides the default value specified by supplemental time data for the region.
The valid values are listed in LDML .
This enum is marked as non-exhaustive Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
The 12-hour clock used in much of the world. Hours are numbered 1–12.
Corresponds to ‘h’ in UTS #35 pattern strings.
The 24-hour clock. Hour are numbered 0–23.
Corresponds to ‘H’ in UTS #35 pattern strings.
Variant of the 12-hour clock, sometimes used in Japan. Hours are numbered 0–11.
Corresponds to ‘K’ in UTS #35 pattern strings.
The 12-hour clock automatically selected based on the locale. Hours are numbered
1-12, 0-11, or another 12-hour clock based on locale data.
Corresponds to ‘j’ in UTS #35 skeleton strings,
except it can resolve to only h or K.
The 24-hour clock automatically selected based on the locale. Hours are numbered
0-23 or another 24-hour clock based on locale data.
Corresponds to ‘j’ in UTS #35 skeleton strings,
except it can resolve to only H.
A helper function for displaying as a &str.
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Converts to this type from the input type.
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Retrieve unicode extension key corresponding to a given preference.
Optional constructor of the given preference. It takes the
unicode extension key and if the key matches it attemptes to construct
the preference based on the given value.
If the value is not a valid value for the given key, the constructor throws.
Retrieve unicode extension value corresponding to the given instance of the preference.
The type returned in the event of a conversion error.
Performs the conversion.
Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.