pub struct ExecutionPlan {
pub goal: String,
pub steps: Vec<Task>,
pub complexity: Complexity,
pub required_tools: Vec<String>,
pub estimated_steps: usize,
}Expand description
Execution plan for a task
Fields§
§goal: StringHigh-level goal
steps: Vec<Task>Decomposed steps
complexity: ComplexityEstimated complexity
required_tools: Vec<String>Required tools
estimated_steps: usizeEstimated total steps
Implementations§
Source§impl ExecutionPlan
impl ExecutionPlan
pub fn new(goal: impl Into<String>, complexity: Complexity) -> Self
pub fn add_step(&mut self, step: Task)
pub fn add_required_tool(&mut self, tool: impl Into<String>)
Sourcepub fn get_ready_steps(&self) -> Vec<&Task>
pub fn get_ready_steps(&self) -> Vec<&Task>
Get steps that are ready to execute (dependencies met)
Sourcepub fn mark_status(&mut self, step_id: &str, status: TaskStatus)
pub fn mark_status(&mut self, step_id: &str, status: TaskStatus)
Update the status of a step by ID
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Count remaining Pending steps
Sourcepub fn has_deadlock(&self) -> bool
pub fn has_deadlock(&self) -> bool
Detect deadlock: Pending steps remain but none are ready to execute.
This happens when all Pending steps have dependencies that are not Completed (e.g., circular deps or all deps Failed/Skipped).
Trait Implementations§
Source§impl Clone for ExecutionPlan
impl Clone for ExecutionPlan
Source§fn clone(&self) -> ExecutionPlan
fn clone(&self) -> ExecutionPlan
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionPlan
impl Debug for ExecutionPlan
Source§impl<'de> Deserialize<'de> for ExecutionPlan
impl<'de> Deserialize<'de> for ExecutionPlan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExecutionPlan
impl RefUnwindSafe for ExecutionPlan
impl Send for ExecutionPlan
impl Sync for ExecutionPlan
impl Unpin for ExecutionPlan
impl UnsafeUnpin for ExecutionPlan
impl UnwindSafe for ExecutionPlan
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