pub struct NodeSharingRegistry { /* private fields */ }Expand description
Node Sharing Registry Manages shared alpha nodes across the RETE network
Implementations§
Source§impl NodeSharingRegistry
impl NodeSharingRegistry
pub fn new() -> Self
Sourcepub fn register(
&mut self,
node: &AlphaNode,
rule_idx: usize,
) -> &SharedAlphaNode
pub fn register( &mut self, node: &AlphaNode, rule_idx: usize, ) -> &SharedAlphaNode
Register an alpha node, returns reference to shared node
Sourcepub fn get(&self, pattern: &AlphaPattern) -> Option<&SharedAlphaNode>
pub fn get(&self, pattern: &AlphaPattern) -> Option<&SharedAlphaNode>
Get shared node for pattern
Sourcepub fn unregister_rule(&mut self, rule_idx: usize)
pub fn unregister_rule(&mut self, rule_idx: usize)
Remove a rule’s reference to shared nodes
Sourcepub fn stats(&self) -> NodeSharingStats
pub fn stats(&self) -> NodeSharingStats
Get optimization statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeSharingRegistry
impl RefUnwindSafe for NodeSharingRegistry
impl Send for NodeSharingRegistry
impl Sync for NodeSharingRegistry
impl Unpin for NodeSharingRegistry
impl UnwindSafe for NodeSharingRegistry
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