pub struct TemplateRegistry { /* private fields */ }Expand description
Template registry for managing templates
Implementations§
Source§impl TemplateRegistry
impl TemplateRegistry
Sourcepub fn create_instance(&self, template_name: &str) -> Result<TypedFacts>
pub fn create_instance(&self, template_name: &str) -> Result<TypedFacts>
Create an instance from a template
Sourcepub fn validate(&self, template_name: &str, facts: &TypedFacts) -> Result<()>
pub fn validate(&self, template_name: &str, facts: &TypedFacts) -> Result<()>
Validate facts against a template
Sourcepub fn list_templates(&self) -> Vec<&str>
pub fn list_templates(&self) -> Vec<&str>
List all registered templates
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TemplateRegistry
impl RefUnwindSafe for TemplateRegistry
impl Send for TemplateRegistry
impl Sync for TemplateRegistry
impl Unpin for TemplateRegistry
impl UnwindSafe for TemplateRegistry
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