#[non_exhaustive]pub enum MorphemeRef<'a, D> {
ListItem(Morpheme<'a, D>),
Single(Box<SingleMorpheme<D>>),
}Expand description
A morpheme reference that can be either list-backed or standalone.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
ListItem(Morpheme<'a, D>)
Single(Box<SingleMorpheme<D>>)
Implementations§
Source§impl<D: DictionaryAccess + Clone> MorphemeRef<'_, D>
impl<D: DictionaryAccess + Clone> MorphemeRef<'_, D>
Trait Implementations§
Source§impl<D: Clone> Clone for MorphemeRef<'_, D>
impl<D: Clone> Clone for MorphemeRef<'_, D>
Source§impl<D: DictionaryAccess + Clone> Debug for MorphemeRef<'_, D>
impl<D: DictionaryAccess + Clone> Debug for MorphemeRef<'_, D>
Source§impl<D: DictionaryAccess + Clone> MorphemeView for MorphemeRef<'_, D>
impl<D: DictionaryAccess + Clone> MorphemeView for MorphemeRef<'_, D>
type Dictionary = D
Source§fn surface(&self) -> MorphemeSurface<'_>
fn surface(&self) -> MorphemeSurface<'_>
Returns text corresponding to the morpheme.
Source§fn get_word_info(&self) -> &WordInfo
fn get_word_info(&self) -> &WordInfo
Returns the dictionary information for this morpheme.
fn self_morpheme(&self) -> MorphemeRef<'_, D>
Source§fn part_of_speech_id(&self) -> u16
fn part_of_speech_id(&self) -> u16
Returns the ID of part of speech of the morpheme.
fn resolver<'a>(&'a self) -> &'a dyn WordInfoResolverwhere
Self::Dictionary: 'a,
Source§fn part_of_speech<'a>(&'a self) -> &'a [String]where
Self::Dictionary: 'a,
fn part_of_speech<'a>(&'a self) -> &'a [String]where
Self::Dictionary: 'a,
Returns the part of speech.
Source§fn dictionary_form<'a>(&'a self) -> &'a strwhere
Self::Dictionary: 'a,
fn dictionary_form<'a>(&'a self) -> &'a strwhere
Self::Dictionary: 'a,
Returns the dictionary form of morpheme. Read more
Source§fn dictionary_form_morpheme(
&self,
) -> SudachiResult<MorphemeRef<'_, Self::Dictionary>>where
Self::Dictionary: Clone,
fn dictionary_form_morpheme(
&self,
) -> SudachiResult<MorphemeRef<'_, Self::Dictionary>>where
Self::Dictionary: Clone,
Returns the morpheme corresponding to this morpheme’s dictionary form. Read more
Source§fn normalized_form<'a>(&'a self) -> &'a strwhere
Self::Dictionary: 'a,
fn normalized_form<'a>(&'a self) -> &'a strwhere
Self::Dictionary: 'a,
Returns the normalized form of morpheme. Read more
Source§fn normalized_form_morpheme(
&self,
) -> SudachiResult<MorphemeRef<'_, Self::Dictionary>>where
Self::Dictionary: Clone,
fn normalized_form_morpheme(
&self,
) -> SudachiResult<MorphemeRef<'_, Self::Dictionary>>where
Self::Dictionary: Clone,
Returns the morpheme corresponding to this morpheme’s normalized form. Read more
Source§fn reading_form<'a>(&'a self) -> &'a strwhere
Self::Dictionary: 'a,
fn reading_form<'a>(&'a self) -> &'a strwhere
Self::Dictionary: 'a,
Returns the reading form of morpheme. Read more
Source§fn dictionary_id(&self) -> i32
fn dictionary_id(&self) -> i32
Returns the dictionary id where the morpheme belongs. Read more
fn synonym_group_ids(&self) -> &[i32]
Auto Trait Implementations§
impl<'a, D> !RefUnwindSafe for MorphemeRef<'a, D>
impl<'a, D> !Send for MorphemeRef<'a, D>
impl<'a, D> !Sync for MorphemeRef<'a, D>
impl<'a, D> !UnwindSafe for MorphemeRef<'a, D>
impl<'a, D> Freeze for MorphemeRef<'a, D>
impl<'a, D> Unpin for MorphemeRef<'a, D>
impl<'a, D> UnsafeUnpin for MorphemeRef<'a, D>
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