pub struct TemplateManager;Expand description
Template manager for creating and managing hook templates
Implementations§
Source§impl TemplateManager
impl TemplateManager
Sourcepub fn get_builtin_templates() -> HashMap<String, HookTemplate>
pub fn get_builtin_templates() -> HashMap<String, HookTemplate>
Get all built-in templates
Returns a map of template names to template definitions.
Sourcepub fn instantiate_template(
template: &HookTemplate,
hook_id: &str,
hook_name: &str,
parameters: &HashMap<String, String>,
) -> Result<Hook>
pub fn instantiate_template( template: &HookTemplate, hook_id: &str, hook_name: &str, parameters: &HashMap<String, String>, ) -> Result<Hook>
Instantiate a template with parameters
Creates a concrete hook from a template by substituting parameters.
§Errors
Returns an error if required parameters are missing or if the template cannot be instantiated.
Auto Trait Implementations§
impl Freeze for TemplateManager
impl RefUnwindSafe for TemplateManager
impl Send for TemplateManager
impl Sync for TemplateManager
impl Unpin for TemplateManager
impl UnwindSafe for TemplateManager
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