#[non_exhaustive]pub enum Idioma {
En,
PtBr,
}Expand description
Supported UI locale for human-facing suggestions.
Machine JSON (error.message, envelopes) stays English regardless of Idioma.
Default build: Idioma::En + Idioma::PtBr only.
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.
En
Neutral English (en) — technical validation locale.
PtBr
Brazilian Portuguese (pt-BR) — development / accent validation locale.
Implementations§
Source§impl Idioma
impl Idioma
Sourcepub const DISPONIVEIS: &'static [Idioma]
pub const DISPONIVEIS: &'static [Idioma]
Locales compiled into this binary (MVP: en + pt-BR).
Sourcepub const fn legacy_token(self) -> &'static str
pub const fn legacy_token(self) -> &'static str
Legacy two-letter token used by older call sites (en / pt).
Sourcepub const fn fallback(self) -> Idioma
pub const fn fallback(self) -> Idioma
Regional fallback (pt-BR → still PtBr as base pack; en is neutral).
Sourcepub const fn script(self) -> ScriptEscrita
pub const fn script(self) -> ScriptEscrita
Writing system.
Sourcepub fn language_identifier(self) -> LanguageIdentifier
pub fn language_identifier(self) -> LanguageIdentifier
Convert to unic_langid::LanguageIdentifier.
Sourcepub fn from_langid(id: &LanguageIdentifier) -> Option<Idioma>
pub fn from_langid(id: &LanguageIdentifier) -> Option<Idioma>
Map a parsed language id onto a compiled pack (language + region aware).
Sourcepub fn parse_token(raw: &str) -> Option<Idioma>
pub fn parse_token(raw: &str) -> Option<Idioma>
Parse a user/CLI/env token into a supported idioma when unambiguous.
Trait Implementations§
impl Copy for Idioma
impl Eq for Idioma
impl StructuralPartialEq for Idioma
Auto Trait Implementations§
impl Freeze for Idioma
impl RefUnwindSafe for Idioma
impl Send for Idioma
impl Sync for Idioma
impl Unpin for Idioma
impl UnsafeUnpin for Idioma
impl UnwindSafe for Idioma
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.