pub struct Locale {
pub lang: String,
pub encoding: Option<String>,
pub country: Option<String>,
pub modifiers: Option<String>,
}Expand description
A locale of an entry.
If given to an entry, the only required argument is the language. Everything else is optional.
Fields§
§lang: StringThe language of the bound value.
encoding: Option<String>The encoding of the bound value.
country: Option<String>The country variant of the language as per the specification.
modifiers: Option<String>Any other variant of the language as per the specification.
Implementations§
Source§impl Locale
impl Locale
Sourcepub fn equals_options(&self, options: &LocaleOptions<'_>) -> bool
pub fn equals_options(&self, options: &LocaleOptions<'_>) -> bool
Check whether this locale respects the options
Trait Implementations§
impl Eq for Locale
impl StructuralPartialEq for Locale
Auto Trait Implementations§
impl Freeze for Locale
impl RefUnwindSafe for Locale
impl Send for Locale
impl Sync for Locale
impl Unpin for Locale
impl UnsafeUnpin for Locale
impl UnwindSafe for Locale
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