pub struct CompiledGraph { /* private fields */ }Expand description
Compiled graph - validated and ready to execute
Implementations§
Source§impl CompiledGraph
impl CompiledGraph
Sourcepub fn entry_point(&self) -> &str
pub fn entry_point(&self) -> &str
Get the entry point
Sourcepub fn get_next(&self, from: &str, output: &str) -> Vec<EdgeTarget>
pub fn get_next(&self, from: &str, output: &str) -> Vec<EdgeTarget>
Get the next node(s) after the given node
Sourcepub async fn run(&self, input: impl Into<String>) -> Result<NodeState>
pub async fn run(&self, input: impl Into<String>) -> Result<NodeState>
Run the graph with an initial input
Sourcepub async fn run_with_state(
&self,
initial_state: NodeState,
) -> Result<NodeState>
pub async fn run_with_state( &self, initial_state: NodeState, ) -> Result<NodeState>
Run the graph with an initial state
When multiple targets are available, executes them in parallel. This implements the Agentic DAG execution model where independent nodes can run concurrently.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Get node count
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Get edge count
Auto Trait Implementations§
impl Freeze for CompiledGraph
impl !RefUnwindSafe for CompiledGraph
impl Send for CompiledGraph
impl Sync for CompiledGraph
impl Unpin for CompiledGraph
impl UnsafeUnpin for CompiledGraph
impl !UnwindSafe for CompiledGraph
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