pub trait Template: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn description(&self) -> &str;
fn category(&self) -> TemplateCategory;
fn expand(&self) -> Result<Vec<UnifiedRule>>;
// Provided methods
fn tags(&self) -> Vec<&str> { ... }
fn render(&self, _variables: &HashMap<String, String>) -> Result<String> { ... }
}Expand description
A loadable template
Required Methods§
Sourcefn description(&self) -> &str
fn description(&self) -> &str
Get a description of this template
Sourcefn category(&self) -> TemplateCategory
fn category(&self) -> TemplateCategory
Get the category of this template
Sourcefn expand(&self) -> Result<Vec<UnifiedRule>>
fn expand(&self) -> Result<Vec<UnifiedRule>>
Expand this template to rules
Provided Methods§
Get template tags for discovery
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".