pub struct Runner<S: CheckpointStore> { /* private fields */ }Expand description
Runner - executes agents/graphs with abort, pause, and event streaming
Implementations§
Source§impl<S: CheckpointStore> Runner<S>
impl<S: CheckpointStore> Runner<S>
Sourcepub fn execution_id(&self) -> &ExecutionId
pub fn execution_id(&self) -> &ExecutionId
Get the execution ID
Sourcepub fn emitter(&self) -> &EventEmitter
pub fn emitter(&self) -> &EventEmitter
Get the event emitter
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check if cancelled
Sourcepub async fn save_checkpoint(
&self,
state: NodeState,
node: Option<&str>,
agent_name: Option<&str>,
) -> Result<Checkpoint>
pub async fn save_checkpoint( &self, state: NodeState, node: Option<&str>, agent_name: Option<&str>, ) -> Result<Checkpoint>
Save checkpoint
§Arguments
state- The current node state to savenode- Optional current node nameagent_name- Optional agent name for restoration on resume
Sourcepub async fn load_checkpoint(&self) -> Result<Option<Checkpoint>>
pub async fn load_checkpoint(&self) -> Result<Option<Checkpoint>>
Load latest checkpoint
Source§impl Runner<InMemoryCheckpointStore>
impl Runner<InMemoryCheckpointStore>
Sourcepub fn default_new() -> Self
pub fn default_new() -> Self
Create a new runner with in-memory checkpoint store
Auto Trait Implementations§
impl<S> !Freeze for Runner<S>
impl<S> !RefUnwindSafe for Runner<S>
impl<S> Send for Runner<S>
impl<S> Sync for Runner<S>
impl<S> Unpin for Runner<S>
impl<S> UnsafeUnpin for Runner<S>
impl<S> !UnwindSafe for Runner<S>
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