Struct pact_matching::MatchingContext[][src]

pub struct MatchingContext {
    pub matchers: MatchingRuleCategory,
    pub config: DiffConfig,
    pub matching_spec: PactSpecification,
}

Context used to apply matching logic

Fields

matchers: MatchingRuleCategory

Matching rules that apply when matching with the context

config: DiffConfig

Configuration to apply when matching with the context

matching_spec: PactSpecification

Specification version to apply when matching with the context

Implementations

impl MatchingContext[src]

pub fn new(config: DiffConfig, matchers: &MatchingRuleCategory) -> Self[src]

Creates a new context with the given config and matching rules

pub fn with_config(config: DiffConfig) -> Self[src]

Creates a new empty context with the given config

pub fn clone_with(&self, matchers: &MatchingRuleCategory) -> Self[src]

Clones the current context with the provided matching rules

pub fn matcher_is_defined(&self, path: &[&str]) -> bool[src]

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

pub fn select_best_matcher(&self, path: &[&str]) -> Option<RuleList>[src]

Selected the best matcher from the context for the given path

pub fn wildcard_matcher_is_defined(&self, path: &[&str]) -> bool[src]

👎 Deprecated since 0.8.12:

Replaced with values matcher

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

pub fn type_matcher_defined(&self, path: &[&str]) -> bool[src]

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

pub fn values_matcher_defined(&self, path: &[&str]) -> bool[src]

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

pub fn match_keys<T: Display + Debug>(
    &self,
    path: &[&str],
    expected: &HashMap<String, T>,
    actual: &HashMap<String, T>
) -> Result<(), Vec<Mismatch>>
[src]

Matches the keys of the expected and actual maps

Trait Implementations

impl Clone for MatchingContext[src]

impl Debug for MatchingContext[src]

impl Default for MatchingContext[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> Conv for T

impl<T> Conv for T

impl<T> FmtForward for T

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

impl<T> Instrument for T[src]

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

impl<T> Pipe for T where
    T: ?Sized

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Tap for T

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T> TryConv for T

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,