pub struct WordInfo { /* private fields */ }Expand description
WordInfo API.
Internal data is not accessible by default, but can be extracted as
let data: WordInfoData = info.into().
Note: this will consume WordInfo.
Implementations§
Source§impl WordInfo
impl WordInfo
pub fn new(data: WordInfoData, word_id: WordId) -> Self
pub fn new_oov( pos_id: u16, index_form_length: i16, word_id: WordId, headword: String, ) -> Self
pub fn new_with_strings( pos_id: i16, index_form_length: i16, word_id: WordId, headword: String, reading: String, normalized_form: String, dictionary_form: String, ) -> Self
pub fn headword_strptr(&self) -> StringPointer
pub fn index_form_length(&self) -> usize
pub fn pos_id(&self) -> u16
pub fn headword<T: WordInfoResolver>(&self, resolver: T) -> &str
pub fn reading_form<T: WordInfoResolver>(&self, resolver: T) -> &str
pub fn normalized_form<T: WordInfoResolver>(&self, resolver: T) -> &str
pub fn dictionary_form<T: WordInfoResolver>(&self, resolver: T) -> &str
pub fn a_unit_split(&self) -> &[WordId]
pub fn b_unit_split(&self) -> &[WordId]
pub fn c_unit_split(&self) -> &[WordId]
pub fn word_structure(&self) -> &[WordId]
pub fn synonym_group_ids(&self) -> &[i32]
pub fn user_data(&self) -> &str
pub fn borrow_data(&self) -> &WordInfoData
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WordInfo
impl RefUnwindSafe for WordInfo
impl Send for WordInfo
impl Sync for WordInfo
impl Unpin for WordInfo
impl UnsafeUnpin for WordInfo
impl UnwindSafe for WordInfo
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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