pub struct RuleDependencyGraph { /* private fields */ }Expand description
Track which rules are affected by which fact types
Implementations§
Source§impl RuleDependencyGraph
impl RuleDependencyGraph
Sourcepub fn add_dependency(&mut self, rule_idx: usize, fact_type: String)
pub fn add_dependency(&mut self, rule_idx: usize, fact_type: String)
Add dependency: rule depends on fact type
Sourcepub fn get_affected_rules(&self, fact_type: &str) -> HashSet<usize>
pub fn get_affected_rules(&self, fact_type: &str) -> HashSet<usize>
Get rules affected by a fact type change
Sourcepub fn get_rule_dependencies(&self, rule_idx: usize) -> HashSet<String>
pub fn get_rule_dependencies(&self, rule_idx: usize) -> HashSet<String>
Get fact types that a rule depends on
Trait Implementations§
Source§impl Debug for RuleDependencyGraph
impl Debug for RuleDependencyGraph
Auto Trait Implementations§
impl Freeze for RuleDependencyGraph
impl RefUnwindSafe for RuleDependencyGraph
impl Send for RuleDependencyGraph
impl Sync for RuleDependencyGraph
impl Unpin for RuleDependencyGraph
impl UnwindSafe for RuleDependencyGraph
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