pub struct Orchestrator { /* private fields */ }Implementations§
Source§impl Orchestrator
impl Orchestrator
Sourcepub async fn execute(&self, graph: &mut Graph) -> Result<()>
pub async fn execute(&self, graph: &mut Graph) -> Result<()>
Execute the graph using the internal executor
Sourcepub async fn execute_graph(graph: &mut Graph) -> Result<()>
pub async fn execute_graph(graph: &mut Graph) -> Result<()>
Execute a graph using a default executor built from the graph definition
Examples found in repository?
examples/simple_flow.rs (line 26)
6async fn main() -> anyhow::Result<()> {
7 // Initialize tracing
8 tracing_subscriber::fmt()
9 .with_max_level(tracing::Level::INFO)
10 .init();
11
12 println!("=== Rust Logic Graph - Simple Flow Example ===\n");
13
14 // Load graph definition from JSON
15 let def = GraphIO::load_from_file("examples/simple_flow.json")?;
16 println!("Loaded graph with {} nodes and {} edges\n",
17 def.nodes.len(),
18 def.edges.len()
19 );
20
21 // Create graph
22 let mut graph = Graph::new(def);
23
24 // Execute the graph
25 println!("Starting graph execution...\n");
26 Orchestrator::execute_graph(&mut graph).await?;
27
28 // Display final context
29 println!("\n=== Final Context ===");
30 for (key, value) in &graph.context.data {
31 println!("{}: {}", key, value);
32 }
33
34 println!("\n=== Execution Complete ===");
35 Ok(())
36}Trait Implementations§
Auto Trait Implementations§
impl Freeze for Orchestrator
impl !RefUnwindSafe for Orchestrator
impl Send for Orchestrator
impl Sync for Orchestrator
impl Unpin for Orchestrator
impl !UnwindSafe for Orchestrator
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