pub trait WorkflowLike:
Send
+ Sync
+ Debug
+ 'static {
Show 15 methods
// Required methods
fn locator(&self) -> Arc<Reference>;
fn path(&self) -> Arc<PathBuf>;
fn date(&self) -> DateTime;
fn version(&self) -> u32;
fn minor_version(&self) -> u32;
fn get_index(&self, identifier: &str) -> Option<usize>;
fn get_row(&self, index: usize) -> Row;
fn get_rule(&self, identifier: &str) -> Option<Arc<Rule>>;
fn contains(&self, identifier: &str) -> bool;
fn has_rule(&self, index: usize) -> bool;
fn rule_count(&self) -> usize;
fn row_count(&self) -> usize;
fn iter_rows<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Row> + 'a>;
fn iter_rules(&self) -> Box<dyn Iterator<Item = Arc<Rule>> + '_>;
fn as_any(&self) -> &dyn Any;
}Expand description
Thread-safe abstraction over workflow rule storage and metadata.
Implemented by concrete workflow containers such as Workflow.
Required Methods§
Sourcefn locator(&self) -> Arc<Reference>
fn locator(&self) -> Arc<Reference>
Returns the global locator (Reference) for this workflow.
The locator uniquely identifies the workflow within the workspace.
Sourcefn path(&self) -> Arc<PathBuf>
fn path(&self) -> Arc<PathBuf>
Returns the file system path to the workflow’s AIM file.
This path points to the .aim file that stores the workflow content.
fn date(&self) -> DateTime
Sourcefn version(&self) -> u32
fn version(&self) -> u32
Returns the major version (epoch) of the workflow.
The epoch represents major structural changes to the workflow. Increments when significant changes are made that require a new version.
Sourcefn minor_version(&self) -> u32
fn minor_version(&self) -> u32
Returns the minor version (partial) of the workflow.
The partial represents incremental updates within the same epoch. Increments for minor changes that don’t require a new major version.
Sourcefn rule_count(&self) -> usize
fn rule_count(&self) -> usize
Returns the number of rules in the workflow.
This counts only the actual rules, excluding empty rows.
Sourcefn row_count(&self) -> usize
fn row_count(&self) -> usize
Returns the total number of rows in the workflow.
This includes both rules and empty rows.
Sourcefn iter_rows<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Row> + 'a>
fn iter_rows<'a>(&'a self) -> Box<dyn Iterator<Item = &'a Row> + 'a>
Returns an iterator over all rows.
The iterator yields &Option<Rule> items, including empty rows.
Use this when you need to preserve the exact row structure.