pub struct World {
pub facts: FactSet,
pub rules: RuleSet,
pub iterations: u64,
pub extern_funcs: HashMap<String, ExternFunc>,
}Fields§
§facts: FactSet§rules: RuleSet§iterations: u64§extern_funcs: HashMap<String, ExternFunc>Implementations§
Source§impl World
impl World
pub fn new() -> Self
pub fn add_fact(&mut self, origin: &Origin, fact: Fact)
pub fn add_rule(&mut self, origin: usize, scope: &TrustedOrigins, rule: Rule)
pub fn run(&mut self, symbols: &SymbolTable) -> Result<(), Execution>
pub fn run_with_limits( &mut self, symbols: &SymbolTable, limits: RunLimits, ) -> Result<(), Execution>
pub fn query_rule( &self, rule: Rule, origin: usize, scope: &TrustedOrigins, symbols: &SymbolTable, ) -> Result<FactSet, Execution>
pub fn query_match( &self, rule: Rule, origin: usize, scope: &TrustedOrigins, symbols: &SymbolTable, ) -> Result<bool, Execution>
pub fn query_match_all( &self, rule: Rule, scope: &TrustedOrigins, symbols: &SymbolTable, ) -> Result<bool, Execution>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for World
impl !RefUnwindSafe for World
impl Send for World
impl Sync for World
impl Unpin for World
impl !UnwindSafe for World
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