Trait pact_matching::MatchingContext[][src]

pub trait MatchingContext {
    fn matcher_is_defined(&self, path: &DocPath) -> bool;
fn select_best_matcher(&self, path: &DocPath) -> RuleList;
fn type_matcher_defined(&self, path: &DocPath) -> bool;
fn values_matcher_defined(&self, path: &DocPath) -> bool;
fn direct_matcher_defined(
        &self,
        path: &DocPath,
        matchers: &HashSet<&str>
    ) -> bool;
fn match_keys(
        &self,
        path: &DocPath,
        expected: &BTreeSet<String>,
        actual: &BTreeSet<String>
    ) -> Result<(), Vec<Mismatch>>;
fn plugin_configuration(&self) -> &HashMap<String, PluginInteractionConfig>;
fn matchers(&self) -> &MatchingRuleCategory;
fn config(&self) -> DiffConfig;
fn clone_with(
        &self,
        matchers: &MatchingRuleCategory
    ) -> Box<dyn MatchingContext>; }
Expand description

Context used to apply matching logic

Required methods

If there is a matcher defined at the path in this context

Selected the best matcher from the context for the given path

If there is a type matcher defined at the path in this context

If there is a values matcher defined at the path in this context

If a matcher defined at the path (ignoring parents)

Matches the keys of the expected and actual maps

Returns the plugin configuration associated with the context

Returns the matching rules for the matching context

Configuration to apply when matching with the context

Clones the current context with the provided matching rules

Implementors