pub struct WorkflowTemplateLibrary { /* private fields */ }Expand description
Workflow template library.
Implementations§
Source§impl WorkflowTemplateLibrary
impl WorkflowTemplateLibrary
Sourcepub fn add_template(&self, template: WorkflowTemplate) -> Result<()>
pub fn add_template(&self, template: WorkflowTemplate) -> Result<()>
Add a template to the library.
Sourcepub fn get_template(&self, id: &str) -> Option<WorkflowTemplate>
pub fn get_template(&self, id: &str) -> Option<WorkflowTemplate>
Get a template by ID.
Sourcepub fn remove_template(&self, id: &str) -> Option<WorkflowTemplate>
pub fn remove_template(&self, id: &str) -> Option<WorkflowTemplate>
Remove a template.
Sourcepub fn list_templates(&self) -> Vec<WorkflowTemplate>
pub fn list_templates(&self) -> Vec<WorkflowTemplate>
List all templates.
Sourcepub fn list_by_category(
&self,
category: &TemplateCategory,
) -> Vec<WorkflowTemplate>
pub fn list_by_category( &self, category: &TemplateCategory, ) -> Vec<WorkflowTemplate>
List templates by category.
Sourcepub fn search_by_tag(&self, tag: &str) -> Vec<WorkflowTemplate>
pub fn search_by_tag(&self, tag: &str) -> Vec<WorkflowTemplate>
Search templates by tag.
Sourcepub fn export_to_json(&self) -> Result<String>
pub fn export_to_json(&self) -> Result<String>
Export library to JSON.
Sourcepub fn import_from_json(&self, json: &str) -> Result<usize>
pub fn import_from_json(&self, json: &str) -> Result<usize>
Import library from JSON.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkflowTemplateLibrary
impl !RefUnwindSafe for WorkflowTemplateLibrary
impl Send for WorkflowTemplateLibrary
impl Sync for WorkflowTemplateLibrary
impl Unpin for WorkflowTemplateLibrary
impl UnsafeUnpin for WorkflowTemplateLibrary
impl !UnwindSafe for WorkflowTemplateLibrary
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