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
use TokenStream;
/// Define a Workflow with fields and edges in one macro invocation.
///
/// Syntax:
/// workflow! {
/// pub struct Name { field1: Type1, field2: Type2, }
/// context = MyCtx;
/// start = field1;
/// edges {
/// field1 => [field2];
/// field2 => [];
/// };
/// }
/// Define a Node with fields and a process body in one macro invocation.
///
/// Syntax:
/// node! {
/// pub struct Name { field1: Type1, field2: Type2, }
/// context = MyCtx;
/// input = InputType;
/// output = OutputType;
/// |ctx, input_val| { /* can access self, returns Result<Transition<OutputType>, FloxideError> */ }
/// }
/// Derive implementation for the `Merge` trait.
///
/// Automatically implements `Merge` by merging each field of a struct using its own `merge` method.