File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
execution-plan-macros/src Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,9 @@ fn impl_value_on_struct(
39
39
} ;
40
40
} ;
41
41
42
+ // We're going to construct some fragments of Rust source code, which will get used in the
43
+ // final generated code this function returns.
44
+
42
45
// For every field in the struct, this macro will:
43
46
// - In the `into_parts`, extend the Vec of parts with that field, turned into parts.
44
47
// - In the `from_parts`, instantiate a Self with a field from that part.
@@ -68,6 +71,8 @@ fn impl_value_on_struct(
68
71
}
69
72
let where_clause = generics. where_clause ;
70
73
74
+ // Final return value: the generated Rust code to implement the trait.
75
+ // This uses the fragments above, interpolating them into the final outputted code.
71
76
quote ! {
72
77
impl #generics_without_defaults kittycad_execution_plan_traits:: Value for #name #generics_without_defaults
73
78
#where_clause
You can’t perform that action at this time.
0 commit comments