pub struct Template {
pub name: String,
pub fields: Vec<FieldDef>,
/* private fields */
}Expand description
Template definition (like CLIPS deftemplate)
Fields§
§name: String§fields: Vec<FieldDef>Implementations§
Source§impl Template
impl Template
Sourcepub fn validate(&self, facts: &TypedFacts) -> Result<()>
pub fn validate(&self, facts: &TypedFacts) -> Result<()>
Validate that facts conform to this template
Sourcepub fn create_instance(&self) -> TypedFacts
pub fn create_instance(&self) -> TypedFacts
Create facts from template with default values
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Template
impl RefUnwindSafe for Template
impl Send for Template
impl Sync for Template
impl Unpin for Template
impl UnwindSafe for Template
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