summaryrefslogtreecommitdiff
path: root/examples/02-sum/output/rust/src/shapes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/02-sum/output/rust/src/shapes.rs')
-rw-r--r--examples/02-sum/output/rust/src/shapes.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/02-sum/output/rust/src/shapes.rs b/examples/02-sum/output/rust/src/shapes.rs
new file mode 100644
index 0000000..9bb32f4
--- /dev/null
+++ b/examples/02-sum/output/rust/src/shapes.rs
@@ -0,0 +1,15 @@
+/// A 2D shape.
+pub enum Shape {
+ Rectangle(crate::shapes::Rectangle),
+ Triangle(crate::shapes::Triangle),
+}
+
+pub struct Rectangle {
+ pub width: i32,
+ pub height: i32,
+}
+
+pub struct Triangle {
+ pub width: i32,
+ pub height: i32,
+}