Enum icu::locale::fallback::LocaleFallbackPriority
source · #[non_exhaustive]pub enum LocaleFallbackPriority {
Language,
Script,
Region,
}
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
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.
Language
Prioritize the language. This is the default behavior.
For example, "en-US"
should go to "en"
and then "und"
.
Script
Prioritize the script.
For example, "en-US"
should go to "en"
and then "und-Latn"
and then "und"
.
Region
Prioritize the region.
For example, "en-US"
should go to "und-US"
and then "und"
.
Implementations§
source§impl LocaleFallbackPriority
impl LocaleFallbackPriority
sourcepub const fn default() -> LocaleFallbackPriority
pub const fn 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
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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
Returns the “default value” for a type. Read more
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,
Compares and returns the maximum of two values. Read more
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
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more