pub struct CompiledStateGraph<S: GraphState> { /* private fields */ }Expand description
A compiled state graph ready for execution.
This is the output of StateGraph::compile(). Use the runtime crate
to execute this graph.
Implementations§
Source§impl<S: GraphState> CompiledStateGraph<S>
impl<S: GraphState> CompiledStateGraph<S>
Sourcepub fn node_names(&self) -> impl Iterator<Item = &NodeId>
pub fn node_names(&self) -> impl Iterator<Item = &NodeId>
Get all node names.
Sourcepub fn edges_from(&self, node: &NodeId) -> Vec<&Edge<S>>
pub fn edges_from(&self, node: &NodeId) -> Vec<&Edge<S>>
Get the edges for a node.
Sourcepub fn entry_points(&self) -> Vec<NodeId>
pub fn entry_points(&self) -> Vec<NodeId>
Get the entry points (nodes with edges from START).
Sourcepub fn should_interrupt_before(&self, node: &NodeId) -> bool
pub fn should_interrupt_before(&self, node: &NodeId) -> bool
Check if a node should interrupt before execution.
Sourcepub fn should_interrupt_after(&self, node: &NodeId) -> bool
pub fn should_interrupt_after(&self, node: &NodeId) -> bool
Check if a node should interrupt after execution.
Sourcepub fn max_iterations(&self) -> Option<usize>
pub fn max_iterations(&self) -> Option<usize>
Get the maximum iterations setting.
Sourcepub fn next_nodes(&self, from: &NodeId) -> Option<Vec<NodeId>>
pub fn next_nodes(&self, from: &NodeId) -> Option<Vec<NodeId>>
Find the next nodes to execute after a given node completes.
For normal edges, returns the fixed target. For conditional edges, returns None (router must be invoked at runtime).
Sourcepub fn to_mermaid(&self) -> String
pub fn to_mermaid(&self) -> String
Generate a Mermaid diagram of the graph.
Trait Implementations§
Source§impl<S: Clone + GraphState> Clone for CompiledStateGraph<S>
impl<S: Clone + GraphState> Clone for CompiledStateGraph<S>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for CompiledStateGraph<S>
impl<S> !UnwindSafe for CompiledStateGraph<S>
impl<S> Freeze for CompiledStateGraph<S>
impl<S> Send for CompiledStateGraph<S>
impl<S> Sync for CompiledStateGraph<S>
impl<S> Unpin for CompiledStateGraph<S>
impl<S> UnsafeUnpin for CompiledStateGraph<S>
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