pub struct ExecutableGraph<P> { /* private fields */ }Expand description
The finalized artifact ready for execution.
Implementations§
Source§impl<P: ControlFlowProtocol> ExecutableGraph<P>
impl<P: ControlFlowProtocol> ExecutableGraph<P>
Sourcepub fn execute(
&self,
input: P,
start_node: usize,
max_steps: usize,
queue: &mut VecDeque<(usize, P)>,
) -> Result<P, GraphError>
pub fn execute( &self, input: P, start_node: usize, max_steps: usize, queue: &mut VecDeque<(usize, P)>, ) -> Result<P, GraphError>
Executes the graph with an initial input using an iterative BFS approach.
§Arguments
input- The initial protocol message to start execution.start_node- The index of the starting node.max_steps- Safety limit to prevent infinite loops in cyclic graphs.queue- A mutable reference to a VecDeque to be used as the execution queue.
The caller is responsible for pre-allocating queue capacity to avoid runtime allocations.
§Returns
Result<P, GraphError>- The final result of the execution or an error.
Source§impl<P: ControlFlowProtocol> ExecutableGraph<P>
impl<P: ControlFlowProtocol> ExecutableGraph<P>
Auto Trait Implementations§
impl<P> Freeze for ExecutableGraph<P>
impl<P> !RefUnwindSafe for ExecutableGraph<P>
impl<P> Send for ExecutableGraph<P>
impl<P> Sync for ExecutableGraph<P>
impl<P> Unpin for ExecutableGraph<P>
impl<P> !UnwindSafe for ExecutableGraph<P>
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