#[non_exhaustive]pub enum LocaleFallbackPriority {
Language,
Region,
Collation,
}Expand description
Hint for which subtag to prioritize during fallback.
For example, "en-US" might fall back to either "en" or "und-US" depending
on this enum.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Language
Prioritize the language. This is the default behavior.
For example, "en-US" should go to "en" and then "und".
Region
Prioritize the region.
For example, "en-US" should go to "und-US" and then "und".
Collation
Collation-specific fallback rules. Similar to language priority.
For example, "zh-Hant" goes to "zh" before "und".
Implementations§
Source§impl LocaleFallbackPriority
impl LocaleFallbackPriority
Sourcepub const fn const_default() -> LocaleFallbackPriority
pub const fn const_default() -> LocaleFallbackPriority
Const-friendly version of Default::default.
Trait Implementations§
Source§impl Clone for LocaleFallbackPriority
impl Clone for LocaleFallbackPriority
Source§fn clone(&self) -> LocaleFallbackPriority
fn clone(&self) -> LocaleFallbackPriority
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LocaleFallbackPriority
impl Debug for LocaleFallbackPriority
Source§impl Default for LocaleFallbackPriority
impl Default for LocaleFallbackPriority
Source§fn default() -> LocaleFallbackPriority
fn default() -> LocaleFallbackPriority
Source§impl Ord for LocaleFallbackPriority
impl Ord for LocaleFallbackPriority
Source§fn cmp(&self, other: &LocaleFallbackPriority) -> Ordering
fn cmp(&self, other: &LocaleFallbackPriority) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for LocaleFallbackPriority
impl PartialEq for LocaleFallbackPriority
Source§impl PartialOrd for LocaleFallbackPriority
impl PartialOrd for LocaleFallbackPriority
impl Copy for LocaleFallbackPriority
impl Eq for LocaleFallbackPriority
impl StructuralPartialEq for LocaleFallbackPriority
Auto Trait Implementations§
impl Freeze for LocaleFallbackPriority
impl RefUnwindSafe for LocaleFallbackPriority
impl Send for LocaleFallbackPriority
impl Sync for LocaleFallbackPriority
impl Unpin for LocaleFallbackPriority
impl UnwindSafe for LocaleFallbackPriority
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Language: 0 bytesRegion: 0 bytesCollation: 0 bytes