Struct pact_matching::models::matchingrules::MatchingRules [−][src]
Data structure for representing a collection of matchers
Fields
rules: HashMap<String, Category>
Categories of matching rules
Methods
impl MatchingRules
[src]
impl MatchingRules
pub fn default() -> MatchingRules
[src]
pub fn default() -> MatchingRules
Create a empty set of matching rules
pub fn is_empty(&self) -> bool
[src]
pub fn is_empty(&self) -> bool
If the matching rules are empty (that is there are no rules assigned to any categories)
pub fn is_not_empty(&self) -> bool
[src]
pub fn is_not_empty(&self) -> bool
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]
pub fn add_category<S>(&mut self, category: S) -> &mut Category where
S: Into<String>,
Adds the category to the map of rules
pub fn categories(&self) -> HashSet<String>
[src]
pub fn categories(&self) -> HashSet<String>
Returns all the category names in this rule set
pub fn rules_for_category(&self, category: &String) -> Option<Category>
[src]
pub fn rules_for_category(&self, category: &String) -> Option<Category>
Returns the category of rules for a given category name
pub fn matcher_is_defined(&self, category: &str, path: &Vec<String>) -> bool
[src]
pub fn matcher_is_defined(&self, category: &str, path: &Vec<String>) -> bool
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]
pub fn wildcard_matcher_is_defined(
&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]
pub fn resolve_matchers(
&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]
pub fn resolve_body_matchers_by_path(
&self,
path: &Vec<String>
) -> Option<RuleList>
Returns a list of rules from the body category that match the given path
Trait Implementations
impl PartialEq for MatchingRules
[src]
impl PartialEq for MatchingRules
fn eq(&self, other: &MatchingRules) -> bool
[src]
fn eq(&self, other: &MatchingRules) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &MatchingRules) -> bool
[src]
fn ne(&self, other: &MatchingRules) -> bool
This method tests for !=
.
impl Debug for MatchingRules
[src]
impl Debug for MatchingRules
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for MatchingRules
[src]
impl Clone for MatchingRules
fn clone(&self) -> MatchingRules
[src]
fn clone(&self) -> MatchingRules
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Eq for MatchingRules
[src]
impl Eq for MatchingRules
impl Hash for MatchingRules
[src]
impl Hash for MatchingRules
Auto Trait Implementations
impl Send for MatchingRules
impl Send for MatchingRules
impl Sync for MatchingRules
impl Sync for MatchingRules