[][src]Struct fuzzy_matcher::skim::SkimScoreConfig

pub struct SkimScoreConfig {
    pub score_match: i32,
    pub gap_start: i32,
    pub gap_extension: i32,
    pub bonus_first_char_multiplier: i32,
    pub bonus_head: i32,
    pub bonus_break: i32,
    pub bonus_camel: i32,
    pub bonus_consecutive: i32,
    pub penalty_case_mismatch: i32,
}

Fields

score_match: i32gap_start: i32gap_extension: i32bonus_first_char_multiplier: i32

The first character in the typed pattern usually has more significance than the rest so it's important that it appears at special positions where bonus points are given. e.g. "to-go" vs. "ongoing" on "og" or on "ogo". The amount of the extra bonus should be limited so that the gap penalty is still respected.

bonus_head: i32

We prefer matches at the beginning of a word, but the bonus should not be too great to prevent the longer acronym matches from always winning over shorter fuzzy matches. The bonus point here was specifically chosen that the bonus is cancelled when the gap between the acronyms grows over 8 characters, which is approximately the average length of the words found in web2 dictionary and my file system.

bonus_break: i32

Just like bonus_head, but its breakage of word is not that strong, so it should be slighter less then bonus_head

bonus_camel: i32

Edge-triggered bonus for matches in camelCase words. Compared to word-boundary case, they don't accompany single-character gaps (e.g. FooBar vs. foo-bar), so we deduct bonus point accordingly.

bonus_consecutive: i32

Minimum bonus point given to characters in consecutive chunks. Note that bonus points for consecutive matches shouldn't have needed if we used fixed match score as in the original algorithm.

penalty_case_mismatch: i32

Skim will match case-sensitively if the pattern contains ASCII upper case, If case of case insensitive match, the penalty will be given to case mismatch

Trait Implementations

impl Clone for SkimScoreConfig[src]

impl Copy for SkimScoreConfig[src]

impl Default for SkimScoreConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.