pub enum LanguageRoot {
ImplicitScript(Language),
Scripted(Language, Script),
}Expand description
The primary language root of a locale - used to group locales that share the same base language (with or without explicit script).
Variants:
ImplicitScript(Language): No script was specified (most common: Latin script implied)Scripted(Language, Script): An explicit script is present (e.g.zh-Hans,sr-Cyrl)
Variants§
ImplicitScript(Language)
Language without an explicit script subtag (implies the default script, usually Latin for Western languages).
Scripted(Language, Script)
Language with an explicit script subtag (important for languages like Chinese, Serbian, Uzbek that have multiple scripts in active use).
Trait Implementations§
Source§impl Clone for LanguageRoot
impl Clone for LanguageRoot
Source§fn clone(&self) -> LanguageRoot
fn clone(&self) -> LanguageRoot
Returns a duplicate 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 LanguageRoot
impl Debug for LanguageRoot
Source§impl Display for LanguageRoot
impl Display for LanguageRoot
Source§impl From<&Locale> for LanguageRoot
impl From<&Locale> for LanguageRoot
Source§impl FromStr for LanguageRoot
impl FromStr for LanguageRoot
Source§impl Hash for LanguageRoot
impl Hash for LanguageRoot
Source§impl Ord for LanguageRoot
impl Ord for LanguageRoot
Source§fn cmp(&self, other: &LanguageRoot) -> Ordering
fn cmp(&self, other: &LanguageRoot) -> 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 LanguageRoot
impl PartialEq for LanguageRoot
Source§impl PartialOrd for LanguageRoot
impl PartialOrd for LanguageRoot
impl Eq for LanguageRoot
impl StructuralPartialEq for LanguageRoot
Auto Trait Implementations§
impl Freeze for LanguageRoot
impl RefUnwindSafe for LanguageRoot
impl Send for LanguageRoot
impl Sync for LanguageRoot
impl Unpin for LanguageRoot
impl UnsafeUnpin for LanguageRoot
impl UnwindSafe for LanguageRoot
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§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
Invokes
WrappingSpan::make_wrapped to wrap an AST node in a span.