pub struct RustRuleEngine { /* private fields */ }Expand description
Rust Rule Engine - High-performance rule execution engine
Implementations§
Source§impl RustRuleEngine
impl RustRuleEngine
Sourcepub fn new(knowledge_base: KnowledgeBase) -> Self
pub fn new(knowledge_base: KnowledgeBase) -> Self
Create a new RustRuleEngine with default configuration
Sourcepub fn with_config(knowledge_base: KnowledgeBase, config: EngineConfig) -> Self
pub fn with_config(knowledge_base: KnowledgeBase, config: EngineConfig) -> Self
Create a new RustRuleEngine with custom configuration
Sourcepub fn register_function<F>(&mut self, name: &str, func: F)
pub fn register_function<F>(&mut self, name: &str, func: F)
Register a custom function
Sourcepub fn has_function(&self, name: &str) -> bool
pub fn has_function(&self, name: &str) -> bool
Check if a custom function is registered
Sourcepub fn execute(&self, facts: &Facts) -> Result<GruleExecutionResult>
pub fn execute(&self, facts: &Facts) -> Result<GruleExecutionResult>
Execute all rules in the knowledge base against the given facts
Auto Trait Implementations§
impl Freeze for RustRuleEngine
impl !RefUnwindSafe for RustRuleEngine
impl Send for RustRuleEngine
impl Sync for RustRuleEngine
impl Unpin for RustRuleEngine
impl !UnwindSafe for RustRuleEngine
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