pub struct TimeTravelGraph { /* private fields */ }Expand description
Graph wrapper with time travel capabilities
Implementations§
Source§impl TimeTravelGraph
impl TimeTravelGraph
Sourcepub fn with_store(graph: Graph, store: Arc<dyn HistoryStore>) -> Self
pub fn with_store(graph: Graph, store: Arc<dyn HistoryStore>) -> Self
Create with custom history store
Sourcepub async fn execute(
&self,
initial_state: GraphState,
) -> Result<ExecutionHistory, CrewError>
pub async fn execute( &self, initial_state: GraphState, ) -> Result<ExecutionHistory, CrewError>
Execute the graph and record full history
Sourcepub async fn replay_from(
&self,
history: &ExecutionHistory,
from_step: usize,
) -> Result<ExecutionHistory, CrewError>
pub async fn replay_from( &self, history: &ExecutionHistory, from_step: usize, ) -> Result<ExecutionHistory, CrewError>
Replay execution from a specific step
Sourcepub async fn fork_from(
&self,
history: &ExecutionHistory,
from_step: usize,
modified_state: GraphState,
) -> Result<ExecutionHistory, CrewError>
pub async fn fork_from( &self, history: &ExecutionHistory, from_step: usize, modified_state: GraphState, ) -> Result<ExecutionHistory, CrewError>
Fork execution from a specific step with modified state
Sourcepub async fn load_history(
&self,
id: &str,
) -> Result<Option<ExecutionHistory>, CrewError>
pub async fn load_history( &self, id: &str, ) -> Result<Option<ExecutionHistory>, CrewError>
Load an execution history by ID
Sourcepub async fn list_executions(&self) -> Result<Vec<String>, CrewError>
pub async fn list_executions(&self) -> Result<Vec<String>, CrewError>
List all executions for this graph
Sourcepub async fn list_forks(
&self,
parent_id: &str,
) -> Result<Vec<String>, CrewError>
pub async fn list_forks( &self, parent_id: &str, ) -> Result<Vec<String>, CrewError>
List all forks of an execution
Sourcepub async fn compare_executions(
&self,
id1: &str,
id2: &str,
) -> Result<ExecutionComparison, CrewError>
pub async fn compare_executions( &self, id1: &str, id2: &str, ) -> Result<ExecutionComparison, CrewError>
Compare two executions
Auto Trait Implementations§
impl Freeze for TimeTravelGraph
impl !RefUnwindSafe for TimeTravelGraph
impl Send for TimeTravelGraph
impl Sync for TimeTravelGraph
impl Unpin for TimeTravelGraph
impl UnsafeUnpin for TimeTravelGraph
impl !UnwindSafe for TimeTravelGraph
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