pub struct LoadedDictionary<'a> {
pub grammar: Grammar<'a>,
pub lexicon_set: LexiconSet<'a>,
}
Expand description
A dictionary consists of one system_dict and zero or more user_dicts
Fields§
§grammar: Grammar<'a>
§lexicon_set: LexiconSet<'a>
Implementations§
source§impl<'a> LoadedDictionary<'a>
impl<'a> LoadedDictionary<'a>
sourcepub fn from_system_dictionary_and_chardef(
dictionary_bytes: &'a [u8],
character_category: CharacterCategory,
) -> SudachiResult<LoadedDictionary<'a>>
pub fn from_system_dictionary_and_chardef( dictionary_bytes: &'a [u8], character_category: CharacterCategory, ) -> SudachiResult<LoadedDictionary<'a>>
Creates a system dictionary from bytes, and preloaded character category
sourcepub fn from_system_dictionary(
dictionary_bytes: &'a [u8],
character_category_file: &Path,
) -> SudachiResult<LoadedDictionary<'a>>
pub fn from_system_dictionary( dictionary_bytes: &'a [u8], character_category_file: &Path, ) -> SudachiResult<LoadedDictionary<'a>>
Creates a system dictionary from bytes, and load a character category from file
sourcepub fn from_system_dictionary_embedded(
dictionary_bytes: &'a [u8],
) -> SudachiResult<LoadedDictionary<'a>>
pub fn from_system_dictionary_embedded( dictionary_bytes: &'a [u8], ) -> SudachiResult<LoadedDictionary<'a>>
Creates a system dictionary from bytes, and load embedded default character category
Trait Implementations§
source§impl<'a> DictionaryAccess for LoadedDictionary<'a>
impl<'a> DictionaryAccess for LoadedDictionary<'a>
fn grammar(&self) -> &Grammar<'a>
fn lexicon(&self) -> &LexiconSet<'a>
fn input_text_plugins(&self) -> &[Box<dyn InputTextPlugin + Sync + Send>]
fn oov_provider_plugins(&self) -> &[Box<dyn OovProviderPlugin + Sync + Send>]
fn path_rewrite_plugins(&self) -> &[Box<dyn PathRewritePlugin + Sync + Send>]
Auto Trait Implementations§
impl<'a> Freeze for LoadedDictionary<'a>
impl<'a> RefUnwindSafe for LoadedDictionary<'a>
impl<'a> Send for LoadedDictionary<'a>
impl<'a> Sync for LoadedDictionary<'a>
impl<'a> Unpin for LoadedDictionary<'a>
impl<'a> UnwindSafe for LoadedDictionary<'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
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