pub struct LocaleOptions<'a> {
pub locale: &'a Locale,
pub country: bool,
pub encoding: bool,
pub modifier: bool,
}Expand description
Defines what options of a Locale are significant when searching for an entry.
Fields§
§locale: &'a LocaleA reference to the locale to be found.
country: boolWhether the country is significant.
encoding: boolWhether the country is significant.
modifier: boolWhether the country is significant.
Implementations§
Source§impl<'a> LocaleOptions<'a>
impl<'a> LocaleOptions<'a>
Sourcepub fn new(locale: &'a Locale) -> Self
pub fn new(locale: &'a Locale) -> Self
Creates a new instance in which all options are insignificant (besides language).
Sourcepub fn all(locale: &'a Locale) -> Self
pub fn all(locale: &'a Locale) -> Self
Creates a new instance in which all options are significant.
Sourcepub fn language_only(self) -> Self
pub fn language_only(self) -> Self
Makes all options insignificant but the language.
Sourcepub fn all_significant(self) -> Self
pub fn all_significant(self) -> Self
Makes all options significant.
Sourcepub fn significant_encoding(self) -> Self
pub fn significant_encoding(self) -> Self
Makes the encoding significant.
Sourcepub fn significant_country(self) -> Self
pub fn significant_country(self) -> Self
Makes the country significant.
Sourcepub fn significant_modifiers(self) -> Self
pub fn significant_modifiers(self) -> Self
Makes the modifiers significant.
Sourcepub fn with_locale(self, locale: &'a Locale) -> Self
pub fn with_locale(self, locale: &'a Locale) -> Self
Changes the locale.
Auto Trait Implementations§
impl<'a> Freeze for LocaleOptions<'a>
impl<'a> RefUnwindSafe for LocaleOptions<'a>
impl<'a> Send for LocaleOptions<'a>
impl<'a> Sync for LocaleOptions<'a>
impl<'a> Unpin for LocaleOptions<'a>
impl<'a> UnsafeUnpin for LocaleOptions<'a>
impl<'a> UnwindSafe for LocaleOptions<'a>
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