pub struct ExecutionPlan {
pub id: String,
pub original_task: String,
pub strategy: DecompositionStrategy,
pub subtasks: Vec<SubTask>,
pub execution_order: Vec<String>,
pub estimated_steps: u32,
pub risk_level: RiskLevel,
pub created_at: DateTime<Utc>,
}Expand description
执行计划
Fields§
§id: String计划ID
original_task: String原始任务描述
strategy: DecompositionStrategy分解策略
subtasks: Vec<SubTask>子任务列表
execution_order: Vec<String>执行顺序(拓扑排序后的ID列表)
estimated_steps: u32估算总步数
risk_level: RiskLevel风险评估
created_at: DateTime<Utc>创建时间
Implementations§
Source§impl ExecutionPlan
impl ExecutionPlan
Sourcepub fn add_subtask(&mut self, subtask: SubTask) -> &mut Self
pub fn add_subtask(&mut self, subtask: SubTask) -> &mut Self
添加子任务
Sourcepub fn compute_execution_order(&mut self) -> Layer2Result<()>
pub fn compute_execution_order(&mut self) -> Layer2Result<()>
计算执行顺序(拓扑排序)
Sourcepub fn to_dag(&self) -> Layer2Result<Dag>
pub fn to_dag(&self) -> Layer2Result<Dag>
转换为 DAG 工作流
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 (const: unstable) · 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