[][src]Enum pact_matching::models::matchingrules::MatchingRule

pub enum MatchingRule {
    Equality,
    Regex(String),
    Type,
    MinType(usize),
    MaxType(usize),
    MinMaxType(usizeusize),
    Timestamp(String),
    Time(String),
    Date(String),
    Include(String),
    Number,
    Integer,
    Decimal,
    Null,
}

Set of all matching rules

Variants

Equality

Matcher using equals

Regex(String)

Match using a regular expression

Type

Match using the type of the value

MinType(usize)

Match using the type of the value and a minimum length for collections

MaxType(usize)

Match using the type of the value and a maximum length for collections

MinMaxType(usizeusize)

Match using the type of the value and a minimum and maximum length for collections

Timestamp(String)

Match the value using a timestamp pattern

Time(String)

Match the value using a time pattern

Date(String)

Match the value using a date pattern

Include(String)

Match if the value includes the given value

Number

Match if the value is a number

Integer

Match if the value is an integer number

Decimal

Match if the value is a decimal number

Null

Match if the value is a null value (this is content specific, for JSON will match a JSON null)

Methods

impl MatchingRule[src]

pub fn from_json(value: &Value) -> Option<MatchingRule>[src]

Builds a MatchingRule from a Value struct

pub fn from_integration_json(m: &Map<String, Value>) -> Option<MatchingRule>[src]

Builds a MatchingRule from a Value struct used by language integrations

pub fn to_json(&self) -> Value[src]

Converts this MatchingRule to a Value struct

Trait Implementations

impl Clone for MatchingRule[src]

impl Debug for MatchingRule[src]

impl<'de> Deserialize<'de> for MatchingRule[src]

impl Eq for MatchingRule[src]

impl Hash for MatchingRule[src]

impl Ord for MatchingRule[src]

impl PartialEq<MatchingRule> for MatchingRule[src]

impl PartialOrd<MatchingRule> for MatchingRule[src]

impl Serialize for MatchingRule[src]

impl StructuralEq for MatchingRule[src]

impl StructuralPartialEq for MatchingRule[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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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.