1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! Async directed computation graphs, using [petgraph](https://crates.io/crates/petgraph).
//!
//! # Usage
//!
//! ```
//! use lemon_graph::{Graph, Executor, nodes::{NodeWrapper, LogNode}};
//!
//! #[tokio::main]
//! async fn main() {
//! let mut graph = Graph::new();
//!
//! // Create a log node and set its message.
//! let log = LogNode::new(&mut graph);
//! let message = log.message(&graph).unwrap();
//! message.set_value(&mut graph, "Hello, world!".to_string().into());
//!
//! // Create a second log node to run after the first.
//! let log_2 = LogNode::new(&mut graph);
//! log_2.run_after(&mut graph, log.0);
//!
//! // Use the first log's message as input to the second log's message.
//! let message_2 = log_2.message(&graph).unwrap();
//! message_2.set_input(&mut graph, Some(message));
//!
//! // Execute the graph.
//! Executor::execute(&mut graph, log.0).await.unwrap();
//! }
//! ```
use ;
use DiGraph;
pub use *;
pub use Value;
pub type Graph = ;