pub trait PatternRule: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn matches(&self, scenario: &MergeScenario<&str>) -> bool;
fn resolve(&self, scenario: &MergeScenario<&str>) -> String;
fn confidence(&self) -> Confidence;
}Expand description
A pattern rule that can match and resolve a conflict.
Required Methods§
Sourcefn matches(&self, scenario: &MergeScenario<&str>) -> bool
fn matches(&self, scenario: &MergeScenario<&str>) -> bool
Check if this rule matches the given conflict scenario.
Sourcefn resolve(&self, scenario: &MergeScenario<&str>) -> String
fn resolve(&self, scenario: &MergeScenario<&str>) -> String
Produce a resolution. Only called if matches returned true.
Sourcefn confidence(&self) -> Confidence
fn confidence(&self) -> Confidence
Confidence level of this rule’s resolution.