pub struct RunControl { /* private fields */ }Expand description
Out-of-band pause/resume/cancel control for a run, shared (Arc) between
FlowApp (which the host’s pause/resume/stop commands signal) and the
Executor (which polls it at node boundaries). One instance is created per
run and registered under that run’s execution id, so several flows (e.g.
multiple canvas tabs) can run and be steered independently.
Implementations§
Source§impl RunControl
impl RunControl
pub fn phase(&self) -> RunPhase
Sourcepub fn reset(&self)
pub fn reset(&self)
Reset to Running at the start of a run so a stale cancel/pause from a
prior run can’t leak into the next one.
pub fn is_cancelling(&self) -> bool
Sourcepub fn resolve_review(&self, approved: bool)
pub fn resolve_review(&self, approved: bool)
Record a human verdict for the AI review gate and release the pause.
The executor picks the decision up via RunControl::take_review.
Sourcepub fn take_review(&self) -> Option<ReviewDecision>
pub fn take_review(&self) -> Option<ReviewDecision>
Take the pending review decision, if any, clearing the slot.
Sourcepub async fn wait_while_paused(&self)
pub async fn wait_while_paused(&self)
Block while the phase is Paused, returning once resumed or cancelling.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RunControl
impl RefUnwindSafe for RunControl
impl Send for RunControl
impl Sync for RunControl
impl Unpin for RunControl
impl UnsafeUnpin for RunControl
impl UnwindSafe for RunControl
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