pub struct DeffactsRegistry { /* private fields */ }Expand description
Registry for managing deffacts Stores named sets of initial facts that can be loaded into working memory
Implementations§
Source§impl DeffactsRegistry
impl DeffactsRegistry
Sourcepub fn register_or_replace(&mut self, deffacts: Deffacts)
pub fn register_or_replace(&mut self, deffacts: Deffacts)
Register a deffacts set, replacing if it exists
Sourcepub fn get_mut(&mut self, name: &str) -> Option<&mut Deffacts>
pub fn get_mut(&mut self, name: &str) -> Option<&mut Deffacts>
Get a mutable reference to a deffacts set
Sourcepub fn list_deffacts(&self) -> Vec<String>
pub fn list_deffacts(&self) -> Vec<String>
List all deffacts names
Sourcepub fn get_all_facts(&self) -> Vec<(String, FactInstance)>
pub fn get_all_facts(&self) -> Vec<(String, FactInstance)>
Get all facts from all deffacts sets
Sourcepub fn total_fact_count(&self) -> usize
pub fn total_fact_count(&self) -> usize
Get total count of all facts across all deffacts
Trait Implementations§
Source§impl Clone for DeffactsRegistry
impl Clone for DeffactsRegistry
Source§fn clone(&self) -> DeffactsRegistry
fn clone(&self) -> DeffactsRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeffactsRegistry
impl Debug for DeffactsRegistry
Auto Trait Implementations§
impl Freeze for DeffactsRegistry
impl RefUnwindSafe for DeffactsRegistry
impl Send for DeffactsRegistry
impl Sync for DeffactsRegistry
impl Unpin for DeffactsRegistry
impl UnwindSafe for DeffactsRegistry
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