pub struct SearchKey {
pub text: String,
pub kind: KeyKind,
pub weight: i32,
pub source_map: Option<Box<[Option<SourceSpan>]>>,
}Fields§
§text: String§kind: KeyKind§weight: i32§source_map: Option<Box<[Option<SourceSpan>]>>Implementations§
Source§impl SearchKey
impl SearchKey
pub fn with_source_map(self, source_map: Vec<Option<SourceSpan>>) -> Self
pub fn original(text: impl Into<String>) -> Self
pub fn normalized(text: impl Into<String>) -> Self
pub fn kana_reading(text: impl Into<String>) -> Self
pub fn romaji_reading(text: impl Into<String>) -> Self
pub fn pinyin_full(text: impl Into<String>) -> Self
pub fn pinyin_joined(text: impl Into<String>) -> Self
pub fn pinyin_initials(text: impl Into<String>) -> Self
pub fn learned_alias(text: impl Into<String>) -> Self
Trait Implementations§
impl Eq for SearchKey
impl StructuralPartialEq for SearchKey
Auto Trait Implementations§
impl Freeze for SearchKey
impl RefUnwindSafe for SearchKey
impl Send for SearchKey
impl Sync for SearchKey
impl Unpin for SearchKey
impl UnsafeUnpin for SearchKey
impl UnwindSafe for SearchKey
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