Struct conjure_oxide::RuleSet
source · pub struct RuleSet<'a> {
pub name: &'a str,
pub order: u8,
pub solver_families: &'a [SolverFamily],
/* private fields */
}
Expand description
A set of rules with a name, priority, and dependencies.
Fields§
§name: &'a str
The name of the rule set.
order: u8
Order of the RuleSet. Used to establish a consistent order of operations when resolving rules. If two RuleSets overlap (contain the same rule but with different priorities), the RuleSet with the higher order will be used as the source of truth.
solver_families: &'a [SolverFamily]
The solver families that this rule set applies to.
Implementations§
source§impl<'a> RuleSet<'a>
impl<'a> RuleSet<'a>
pub const fn new( name: &'a str, order: u8, dependencies: &'a [&'a str], solver_families: &'a [SolverFamily], ) -> RuleSet<'a>
sourcepub fn get_rules(&self) -> &HashMap<&'a Rule<'a>, u8>
pub fn get_rules(&self) -> &HashMap<&'a Rule<'a>, u8>
Get the rules of this rule set, evaluating them lazily if necessary
Returns a &HashMap<&Rule, u8>
where the key is the rule and the value is the priority of the rule.
sourcepub fn get_dependencies(&self) -> &HashSet<&'static RuleSet<'_>>
pub fn get_dependencies(&self) -> &HashSet<&'static RuleSet<'_>>
Get the dependencies of this rule set, evaluating them lazily if necessary
Returns a &HashSet<&RuleSet>
of the rule sets that this rule set depends on.
sourcepub fn with_dependencies(&self) -> HashSet<&'static RuleSet<'_>>
pub fn with_dependencies(&self) -> HashSet<&'static RuleSet<'_>>
Get the dependencies of this rule set, including itself
Trait Implementations§
impl<'a> Eq for RuleSet<'a>
Auto Trait Implementations§
impl<'a> !Freeze for RuleSet<'a>
impl<'a> RefUnwindSafe for RuleSet<'a>
impl<'a> Send for RuleSet<'a>
impl<'a> Sync for RuleSet<'a>
impl<'a> Unpin for RuleSet<'a>
impl<'a> UnwindSafe for RuleSet<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)