pub struct LocaleRegistry {
pub locales: Vec<CompiledLocale>,
pub code_to_id: FxHashMap<String, usize>,
pub token_to_langs: FxHashMap<String, Vec<u16>>,
pub folded_token_to_langs: FxHashMap<String, Vec<u16>>,
pub exact_phrase_index: FxHashMap<String, Vec<(u16, RelativeSpec)>>,
pub folded_exact_phrase_index: FxHashMap<String, Vec<(u16, RelativeSpec)>>,
pub known_date_tokens: FxHashSet<String>,
}Fields§
§locales: Vec<CompiledLocale>§code_to_id: FxHashMap<String, usize>§token_to_langs: FxHashMap<String, Vec<u16>>Global inverted index: lowercase token -> priority-ordered list of locale IDs.
folded_token_to_langs: FxHashMap<String, Vec<u16>>Folded inverted index: diacritic-folded token -> priority-ordered list of locale IDs.
exact_phrase_index: FxHashMap<String, Vec<(u16, RelativeSpec)>>Global exact relative phrase index: phrase -> list of (lang_id, RelativeSpec).
folded_exact_phrase_index: FxHashMap<String, Vec<(u16, RelativeSpec)>>Folded exact relative phrase index: folded phrase -> list of (lang_id, RelativeSpec).
known_date_tokens: FxHashSet<String>Tokens that can start or belong to a date expression (used for fast search_dates).
Implementations§
Source§impl LocaleRegistry
impl LocaleRegistry
Auto Trait Implementations§
impl Forget for LocaleRegistry
impl Freeze for LocaleRegistry
impl Move for LocaleRegistry
impl RefUnwindSafe for LocaleRegistry
impl Send for LocaleRegistry
impl Sync for LocaleRegistry
impl Unpin for LocaleRegistry
impl UnsafeUnpin for LocaleRegistry
impl UnwindSafe for LocaleRegistry
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> 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 more