[−][src]Struct pact_matching::models::matchingrules::MatchingRules
Data structure for representing a collection of matchers
Fields
rules: HashMap<String, Category>
Categories of matching rules
Implementations
impl MatchingRules
[src]
pub fn is_empty(&self) -> bool
[src]
If the matching rules are empty (that is there are no rules assigned to any categories)
pub fn is_not_empty(&self) -> bool
[src]
If the matching rules are not empty (that is there is at least one rule assigned to a category)
pub fn add_category<S>(&mut self, category: S) -> &mut Category where
S: Into<String>,
[src]
S: Into<String>,
Adds the category to the map of rules
pub fn categories(&self) -> HashSet<String>
[src]
Returns all the category names in this rule set
pub fn rules_for_category(&self, category: &String) -> Option<Category>
[src]
Returns the category of rules for a given category name
pub fn matcher_is_defined(&self, category: &str, path: &Vec<String>) -> bool
[src]
If there is a matcher defined for the category and path
pub fn wildcard_matcher_is_defined(
&self,
category: &str,
path: &Vec<String>
) -> bool
[src]
&self,
category: &str,
path: &Vec<String>
) -> bool
If there is a wildcard matcher defined for the category and path
pub fn resolve_matchers(
&self,
category: &str,
path: &Vec<String>
) -> Option<Category>
[src]
&self,
category: &str,
path: &Vec<String>
) -> Option<Category>
Returns a Category
filtered with all rules that match the given path.
pub fn resolve_body_matchers_by_path(
&self,
path: &Vec<String>
) -> Option<RuleList>
[src]
&self,
path: &Vec<String>
) -> Option<RuleList>
Returns a list of rules from the body category that match the given path
Trait Implementations
impl Clone for MatchingRules
[src]
fn clone(&self) -> MatchingRules
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for MatchingRules
[src]
impl Default for MatchingRules
[src]
impl<'de> Deserialize<'de> for MatchingRules
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Eq for MatchingRules
[src]
impl Hash for MatchingRules
[src]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<MatchingRules> for MatchingRules
[src]
impl Serialize for MatchingRules
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralEq for MatchingRules
[src]
Auto Trait Implementations
impl RefUnwindSafe for MatchingRules
impl Send for MatchingRules
impl Sync for MatchingRules
impl Unpin for MatchingRules
impl UnwindSafe for MatchingRules
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,