pub struct GraphExecutor {
pub max_steps: usize,
/* private fields */
}Expand description
Graph 执行器 — v04: BranchState + NodeContext。
Fields§
§max_steps: usizeImplementations§
Source§impl GraphExecutor
impl GraphExecutor
pub fn new(max_steps: usize) -> Self
pub fn with_checkpoint( max_steps: usize, store: Arc<dyn CheckpointStore>, policy: CheckpointPolicy, graph: &Graph, ) -> Self
pub fn register_reducer(&mut self, key: &str, reducer: Reducer)
pub fn set_graph(&mut self, graph: &Graph)
pub async fn execute( &self, graph: Arc<Graph>, initial_state: State, ) -> Result<GraphResult, GraphError>
pub fn execute_stream( &self, graph: Arc<Graph>, initial_state: State, ) -> GraphExecution
pub async fn resume_from( &self, store: &dyn CheckpointStore, trace_id: &TraceId, graph: &Arc<Graph>, ) -> Result<GraphExecution, GraphError>
Trait Implementations§
Source§impl Clone for GraphExecutor
impl Clone for GraphExecutor
Source§impl Debug for GraphExecutor
impl Debug for GraphExecutor
Auto Trait Implementations§
impl !RefUnwindSafe for GraphExecutor
impl !UnwindSafe for GraphExecutor
impl Freeze for GraphExecutor
impl Send for GraphExecutor
impl Sync for GraphExecutor
impl Unpin for GraphExecutor
impl UnsafeUnpin for GraphExecutor
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