Struct fiveo::MatcherParameters [] [src]

pub struct MatcherParameters {
    pub slash_bonus: f32,
    pub separator_bonus: f32,
    pub camelcase_bonus: f32,
    pub period_bonus: f32,
    pub max_gap: usize,
    pub cache_size: usize,
    pub distance_penalty: f32,
    pub min_distance_penalty: f32,
    pub cumulative_distance_penalty: f32,
}

A set of parameters that can be tuned to change the scores assigned to certain matches.

Fields

The bonus for a matching character found after a slash.

The bonus for a matching character found after a separator.

The bonus for a matching character found as a separator of a CamelCase string.

The bonus for a matching character found after a period.

The maximum gap between a search character and a match to be considered before moving to the next character.

The size of the cache that will be allocated each search for memoizing score function calls. Query/candidate pairs exceeding this size will only be matched using the simple matcher.

The base distance penalty for matches occurring after proceeding without a successful match.

The lowest value the distance penalty can decrease to.

The increment that the distance penalty decreases in.

Trait Implementations

impl Default for MatcherParameters
[src]

Define a sane set of default MatcherParameters that adhere to the same parameters followed by Cmd-T.

The rules in these default parameters prefers slashes over separators, and camelcase / separators over periods, with a max gap of 10.

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations