pub fn get_rule_set_by_name(name: &str) -> Option<&'static RuleSet<'static>>
Expand description
Get a rule set by name. Returns the rule set with the given name or None if it doesn’t exist.
§Example
use conjure_core::rule_engine::register_rule_set;
use conjure_core::rule_engine::get_rule_set_by_name;
register_rule_set!("MyRuleSet", 10, ("DependencyRuleSet", "AnotherRuleSet"));
println!("Rule set: {:?}", get_rule_set_by_name("MyRuleSet"));
This will print:
Rule set: Some(RuleSet { name: "MyRuleSet", order: 10, rules: OnceLock { state: Uninitialized }, dependencies: ["DependencyRuleSet", "AnotherRuleSet"] })