pub struct Deffacts {
pub name: String,
pub facts: Vec<FactInstance>,
pub description: Option<String>,
}Expand description
A named set of initial facts (deffacts)
Fields§
§name: StringName of this deffacts set
facts: Vec<FactInstance>Collection of initial facts
description: Option<String>Optional description
Implementations§
Source§impl Deffacts
impl Deffacts
Sourcepub fn add_fact(&mut self, fact_type: impl Into<String>, data: TypedFacts)
pub fn add_fact(&mut self, fact_type: impl Into<String>, data: TypedFacts)
Add a fact to this deffacts set
Sourcepub fn set_description(&mut self, description: impl Into<String>)
pub fn set_description(&mut self, description: impl Into<String>)
Set the description
Sourcepub fn fact_count(&self) -> usize
pub fn fact_count(&self) -> usize
Get the number of facts
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Deffacts
impl RefUnwindSafe for Deffacts
impl Send for Deffacts
impl Sync for Deffacts
impl Unpin for Deffacts
impl UnwindSafe for Deffacts
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