pub struct SimpleExecutor { /* private fields */ }Expand description
兼容 SimpleExecutor 的 API,供测试使用。
仅支持 Graph<State, StateMerge>(默认泛型参数)。
Implementations§
Source§impl SimpleExecutor
impl SimpleExecutor
pub fn new(max_steps: usize) -> Self
pub async fn execute( &self, graph: Arc<Graph>, state: State, ) -> Result<GraphResult, GraphError>
pub fn execute_stream( &self, graph: Arc<Graph>, state: State, ) -> GraphExecution<State>
pub fn execute_stream_with_restore( &self, graph: Arc<Graph>, state: State, restore_from: Option<Checkpoint<State>>, ) -> GraphExecution<State>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimpleExecutor
impl RefUnwindSafe for SimpleExecutor
impl Send for SimpleExecutor
impl Sync for SimpleExecutor
impl Unpin for SimpleExecutor
impl UnsafeUnpin for SimpleExecutor
impl UnwindSafe for SimpleExecutor
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