pub struct DebugSession { /* private fields */ }Expand description
Debug mode for step-by-step execution
Implementations§
Source§impl DebugSession
impl DebugSession
Sourcepub fn new(graph: Arc<Graph>, initial_state: GraphState) -> Self
pub fn new(graph: Arc<Graph>, initial_state: GraphState) -> Self
Create a new debug session
Sourcepub fn add_breakpoint(&mut self, node_id: impl Into<String>)
pub fn add_breakpoint(&mut self, node_id: impl Into<String>)
Add a breakpoint at a node
Sourcepub fn remove_breakpoint(&mut self, node_id: &str)
pub fn remove_breakpoint(&mut self, node_id: &str)
Remove a breakpoint
Sourcepub fn current_state(&self) -> &GraphState
pub fn current_state(&self) -> &GraphState
Get current state
Sourcepub fn current_node(&self) -> &str
pub fn current_node(&self) -> &str
Get current node
Sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Check if execution is finished
Sourcepub async fn step(&mut self) -> Result<StepResult, CrewError>
pub async fn step(&mut self) -> Result<StepResult, CrewError>
Execute a single step
Sourcepub async fn run(&mut self) -> Result<StepResult, CrewError>
pub async fn run(&mut self) -> Result<StepResult, CrewError>
Run until a breakpoint or completion
Sourcepub fn modify_state<F>(&mut self, f: F)where
F: FnOnce(&mut GraphState),
pub fn modify_state<F>(&mut self, f: F)where
F: FnOnce(&mut GraphState),
Modify current state
Sourcepub fn history(&self) -> &[HistoryStep]
pub fn history(&self) -> &[HistoryStep]
Get execution history so far
Sourcepub fn into_history(
self,
status: GraphStatus,
error: Option<String>,
) -> ExecutionHistory
pub fn into_history( self, status: GraphStatus, error: Option<String>, ) -> ExecutionHistory
Convert to final ExecutionHistory
Auto Trait Implementations§
impl Freeze for DebugSession
impl !RefUnwindSafe for DebugSession
impl Send for DebugSession
impl Sync for DebugSession
impl Unpin for DebugSession
impl UnsafeUnpin for DebugSession
impl !UnwindSafe for DebugSession
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more