Struct lindera_core::dictionary::UserDictionary
source · pub struct UserDictionary {
pub dict: PrefixDict<Vec<u8>>,
pub words_idx_data: Vec<u8>,
pub words_data: Vec<u8>,
}
Fields§
§dict: PrefixDict<Vec<u8>>
§words_idx_data: Vec<u8>
§words_data: Vec<u8>
Implementations§
source§impl UserDictionary
impl UserDictionary
pub fn load(user_dict_data: &[u8]) -> LinderaResult<UserDictionary>
pub fn word_details(&self, word_id: usize) -> Option<Vec<String>>
Trait Implementations§
source§impl Clone for UserDictionary
impl Clone for UserDictionary
source§fn clone(&self) -> UserDictionary
fn clone(&self) -> UserDictionary
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'de> Deserialize<'de> for UserDictionary
impl<'de> Deserialize<'de> for UserDictionary
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UserDictionary
impl RefUnwindSafe for UserDictionary
impl Send for UserDictionary
impl Sync for UserDictionary
impl Unpin for UserDictionary
impl UnwindSafe for UserDictionary
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