pub struct DictionaryLoader<'a> {
    pub header: Header,
    pub grammar: Option<Grammar<'a>>,
    pub lexicon: Lexicon<'a>,
}Expand description
A single system or user dictionary
Fields§
§header: Header§grammar: Option<Grammar<'a>>§lexicon: Lexicon<'a>Implementations§
Source§impl<'a> DictionaryLoader<'a>
 
impl<'a> DictionaryLoader<'a>
Sourcepub unsafe fn read_any_dictionary(
    dictionary_bytes: &[u8],
) -> SudachiResult<DictionaryLoader<'_>>
 
pub unsafe fn read_any_dictionary( dictionary_bytes: &[u8], ) -> SudachiResult<DictionaryLoader<'_>>
Creates a binary dictionary from bytes
§Safety
This function is marked unsafe because it does not perform header validation
Sourcepub fn read_system_dictionary(
    dictionary_bytes: &[u8],
) -> SudachiResult<DictionaryLoader<'_>>
 
pub fn read_system_dictionary( dictionary_bytes: &[u8], ) -> SudachiResult<DictionaryLoader<'_>>
Creates a system binary dictionary from bytes
Returns Err if header version is not match
Sourcepub fn read_user_dictionary(
    dictionary_bytes: &[u8],
) -> SudachiResult<DictionaryLoader<'_>>
 
pub fn read_user_dictionary( dictionary_bytes: &[u8], ) -> SudachiResult<DictionaryLoader<'_>>
Creates a user binary dictionary from bytes
Returns Err if header version is not match
pub fn to_loaded(self) -> Option<LoadedDictionary<'a>>
Auto Trait Implementations§
impl<'a> Freeze for DictionaryLoader<'a>
impl<'a> RefUnwindSafe for DictionaryLoader<'a>
impl<'a> Send for DictionaryLoader<'a>
impl<'a> Sync for DictionaryLoader<'a>
impl<'a> Unpin for DictionaryLoader<'a>
impl<'a> UnwindSafe for DictionaryLoader<'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