pub struct LoadedDictionary<'a> {
pub description: Description,
pub grammar: Grammar<'a>,
pub lexicon_set: LexiconSet<'a>,
/* private fields */
}Expand description
A dictionary consists of one system_dict and zero or more user_dicts.
This is mostly used for testing purpose.
Fields§
§description: Description§grammar: Grammar<'a>§lexicon_set: LexiconSet<'a>Implementations§
Source§impl<'a> LoadedDictionary<'a>
impl<'a> LoadedDictionary<'a>
Sourcepub fn from_system_binary(binary: BinaryDictionary<'a>) -> SudachiResult<Self>
pub fn from_system_binary(binary: BinaryDictionary<'a>) -> SudachiResult<Self>
Convert to Loaded dictionary
pub fn load_system(bytes: &'a [u8]) -> SudachiResult<Self>
pub fn description(&self) -> &Description
pub fn merge_dictionary( self, other: BinaryDictionary<'a>, ) -> SudachiResult<Self>
Trait Implementations§
Source§impl DescriptionAccess for LoadedDictionary<'_>
impl DescriptionAccess for LoadedDictionary<'_>
fn description(&self) -> &Description
Source§impl DictionaryAccess for LoadedDictionary<'_>
impl DictionaryAccess for LoadedDictionary<'_>
fn grammar(&self) -> &Grammar<'_>
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>]
Source§impl LexiconAccess for LoadedDictionary<'_>
impl LexiconAccess for LoadedDictionary<'_>
fn lexicon(&self) -> &LexiconSet<'_>
Source§impl ReferenceIdAccess for LoadedDictionary<'_>
impl ReferenceIdAccess for LoadedDictionary<'_>
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> UnsafeUnpin 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