pub struct Scoring {
pub match_score: u16,
pub mismatch_penalty: u16,
pub gap_open_penalty: u16,
pub gap_extend_penalty: u16,
pub prefix_bonus: u16,
pub offset_prefix_bonus: u16,
pub capitalization_bonus: u16,
pub matching_case_bonus: u16,
pub exact_match_bonus: u16,
pub delimiters: String,
pub delimiter_bonus: u16,
}Fields§
§match_score: u16Score for a matching character between needle and haystack
mismatch_penalty: u16Penalty for a mismatch (substitution)
gap_open_penalty: u16Penalty for opening a gap (deletion/insertion)
gap_extend_penalty: u16Penalty for extending a gap (deletion/insertion)
prefix_bonus: u16Bonus for matching the first character of the haystack (e.g. “h” on “hello_world”)
offset_prefix_bonus: u16Bonus for matching the second character of the haystack, if the first character is not a letter (e.g. “h” on “_hello_world”)
capitalization_bonus: u16Bonus for matching a capital letter after a lowercase letter (e.g. “b” on “fooBar” will receive a bonus on “B”)
matching_case_bonus: u16Bonus for matching the case of the needle (e.g. “WorLd” on “WoRld” will receive a bonus on “W”, “o”, “d”)
exact_match_bonus: u16Bonus for matching the exact needle (e.g. “foo” on “foo” will receive the bonus)
delimiters: StringList of characters which are considered delimiters
delimiter_bonus: u16Bonus for matching after a delimiter character (e.g. “hw” on “hello_world”, will give a bonus on “w”) if “_” is included in the delimiters string
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scoring
impl RefUnwindSafe for Scoring
impl Send for Scoring
impl Sync for Scoring
impl Unpin for Scoring
impl UnwindSafe for Scoring
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
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>
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>
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