Function get_workspace

Source
pub fn get_workspace() -> Arc<dyn WorkflowLike>
Expand description

Returns a read-only snapshot of the current workspace.

This function provides concurrent access to the workspace by returning a cloned snapshot of the workflow wrapped in an Arc<dyn WorkflowLike>. Multiple readers can access the workspace simultaneously without blocking.

§Returns

  • Arc<dyn WorkflowLike> - A thread-safe, read-only reference to the workflow

§Examples

use aimx::workspace::get_workspace;
 
let workflow = get_workspace();
let rule_count = workflow.rule_count();
println!("Workspace contains {} rules", rule_count);