pub struct LocaleSelection { /* private fields */ }Expand description
Outcome of locale resolution including the effective localizer and provenance.
Implementations§
Source§impl LocaleSelection
impl LocaleSelection
Sourcepub const fn source(&self) -> LocaleSource
pub const fn source(&self) -> LocaleSource
Returns the effective locale source.
Sourcepub fn requested(&self) -> Option<&str>
pub fn requested(&self) -> Option<&str>
Returns the locale requested by the resolved source, if any.
Sourcepub fn used_fallback(&self) -> bool
pub fn used_fallback(&self) -> bool
Whether the fallback locale was used.
Sourcepub fn into_localizer(self) -> Localizer
pub fn into_localizer(self) -> Localizer
Consumes the selection, yielding the Localizer.
Sourcepub fn log_outcome(&self, target: &str)
pub fn log_outcome(&self, target: &str)
Emit a debug log summarizing the resolved locale.
Trait Implementations§
Source§impl Clone for LocaleSelection
impl Clone for LocaleSelection
Source§fn clone(&self) -> LocaleSelection
fn clone(&self) -> LocaleSelection
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LocaleSelection
impl RefUnwindSafe for LocaleSelection
impl Send for LocaleSelection
impl Sync for LocaleSelection
impl Unpin for LocaleSelection
impl UnsafeUnpin for LocaleSelection
impl UnwindSafe for LocaleSelection
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