pub struct InteractiveSession<'a> { /* private fields */ }Expand description
Interactive execution session
Implementations§
Source§impl<'a> InteractiveSession<'a>
impl<'a> InteractiveSession<'a>
Sourcepub fn state(&self) -> &GraphState
pub fn state(&self) -> &GraphState
Get current state
Sourcepub fn current_node(&self) -> &str
pub fn current_node(&self) -> &str
Get current node
Sourcepub fn status(&self) -> SessionStatus
pub fn status(&self) -> SessionStatus
Get session status
Sourcepub fn session_id(&self) -> &str
pub fn session_id(&self) -> &str
Get session ID
Sourcepub async fn next(&mut self) -> Result<HumanLoopAction, CrewError>
pub async fn next(&mut self) -> Result<HumanLoopAction, CrewError>
Execute next step
Sourcepub async fn approve_with_changes(
&mut self,
changes: Value,
) -> Result<(), CrewError>
pub async fn approve_with_changes( &mut self, changes: Value, ) -> Result<(), CrewError>
Approve with modified state
Sourcepub async fn reject(
&mut self,
reason: impl Into<String>,
) -> Result<(), CrewError>
pub async fn reject( &mut self, reason: impl Into<String>, ) -> Result<(), CrewError>
Reject and stop or go back
Sourcepub async fn provide_input(&mut self, value: Value) -> Result<(), CrewError>
pub async fn provide_input(&mut self, value: Value) -> Result<(), CrewError>
Provide input and continue
Sourcepub async fn resume_with_state(
&mut self,
new_state: GraphState,
) -> Result<(), CrewError>
pub async fn resume_with_state( &mut self, new_state: GraphState, ) -> Result<(), CrewError>
Resume with modified state
Sourcepub async fn interrupt(
&mut self,
reason: impl Into<String>,
) -> Result<(), CrewError>
pub async fn interrupt( &mut self, reason: impl Into<String>, ) -> Result<(), CrewError>
Interrupt execution
Sourcepub fn checkpoint_id(&self) -> String
pub fn checkpoint_id(&self) -> String
Get checkpoint ID for this session
Sourcepub async fn run_until_human_action(
&mut self,
) -> Result<HumanLoopAction, CrewError>
pub async fn run_until_human_action( &mut self, ) -> Result<HumanLoopAction, CrewError>
Run to completion or next human action
Auto Trait Implementations§
impl<'a> Freeze for InteractiveSession<'a>
impl<'a> !RefUnwindSafe for InteractiveSession<'a>
impl<'a> Send for InteractiveSession<'a>
impl<'a> Sync for InteractiveSession<'a>
impl<'a> Unpin for InteractiveSession<'a>
impl<'a> UnsafeUnpin for InteractiveSession<'a>
impl<'a> !UnwindSafe for InteractiveSession<'a>
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