1#[derive(Debug, Clone)]
5pub struct SchemaNode {
6 pub name: String,
7 pub version: String,
8 pub states: Vec<StateNode>,
9 pub actions: Vec<ActionNode>,
10 pub arcs: Vec<ArcNode>,
11 pub constraints: Vec<ConstraintNode>,
12}
13
14#[derive(Debug, Clone)]
16pub struct StateNode {
17 pub id: String,
18 pub typ: String,
19 pub kind: String, pub initial: Option<InitialValue>,
21 pub exported: bool,
22}
23
24#[derive(Debug, Clone)]
26pub enum InitialValue {
27 Int(i64),
28 Str(String),
29 Nil,
30}
31
32#[derive(Debug, Clone)]
34pub struct ActionNode {
35 pub id: String,
36 pub guard: String,
37}
38
39#[derive(Debug, Clone)]
41pub struct ArcNode {
42 pub source: String,
43 pub target: String,
44 pub keys: Vec<String>,
45 pub value: String,
46}
47
48#[derive(Debug, Clone)]
50pub struct ConstraintNode {
51 pub id: String,
52 pub expr: String,
53}