pub struct Idb { /* private fields */ }Expand description
The intensional database: the set of derived (output) facts.
Implementations§
Source§impl Idb
impl Idb
Sourcepub fn get_relation(&self, predicate: &str) -> Option<&Relation>
pub fn get_relation(&self, predicate: &str) -> Option<&Relation>
Retrieve the relation for a predicate, if any.
Sourcepub fn insert(&mut self, predicate: &str, fact: Fact) -> bool
pub fn insert(&mut self, predicate: &str, fact: Fact) -> bool
Insert a derived fact. Returns true if the fact was new.
Sourcepub fn total_facts(&self) -> usize
pub fn total_facts(&self) -> usize
Total number of derived facts.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Idb
impl RefUnwindSafe for Idb
impl Send for Idb
impl Sync for Idb
impl Unpin for Idb
impl UnsafeUnpin for Idb
impl UnwindSafe for Idb
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