pub struct ExecutionMonitor { /* private fields */ }Expand description
执行监控器
Implementations§
Source§impl ExecutionMonitor
impl ExecutionMonitor
Sourcepub fn new(plan: ExecutionPlan) -> Self
pub fn new(plan: ExecutionPlan) -> Self
创建新的执行监控器
Sourcepub async fn set_progress_callback<F>(&self, callback: F)
pub async fn set_progress_callback<F>(&self, callback: F)
设置进度回调
Sourcepub async fn get_status(&self) -> ExecutionStatus
pub async fn get_status(&self) -> ExecutionStatus
获取当前状态
Sourcepub async fn get_progress(&self) -> u32
pub async fn get_progress(&self) -> u32
获取执行进度 (0-100)
Sourcepub async fn start(&self) -> Layer2Result<()>
pub async fn start(&self) -> Layer2Result<()>
开始执行
Sourcepub async fn report_step_completed(
&self,
subtask_id: &str,
output: String,
) -> Layer2Result<()>
pub async fn report_step_completed( &self, subtask_id: &str, output: String, ) -> Layer2Result<()>
报告步骤完成
Sourcepub async fn report_step_failed(
&self,
subtask_id: &str,
error: String,
) -> Layer2Result<CorrectionDecision>
pub async fn report_step_failed( &self, subtask_id: &str, error: String, ) -> Layer2Result<CorrectionDecision>
报告步骤失败
Sourcepub async fn apply_correction(
&self,
subtask_id: &str,
decision: &CorrectionDecision,
) -> Layer2Result<bool>
pub async fn apply_correction( &self, subtask_id: &str, decision: &CorrectionDecision, ) -> Layer2Result<bool>
应用纠错策略
Sourcepub async fn complete(&self) -> Layer2Result<ExecutionSummary>
pub async fn complete(&self) -> Layer2Result<ExecutionSummary>
完成执行
Sourcepub async fn get_correction_history(&self) -> Vec<CorrectionRecord>
pub async fn get_correction_history(&self) -> Vec<CorrectionRecord>
获取纠错历史
Auto Trait Implementations§
impl !RefUnwindSafe for ExecutionMonitor
impl !UnwindSafe for ExecutionMonitor
impl Freeze for ExecutionMonitor
impl Send for ExecutionMonitor
impl Sync for ExecutionMonitor
impl Unpin for ExecutionMonitor
impl UnsafeUnpin for ExecutionMonitor
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