summaryrefslogtreecommitdiff
path: root/examples/02-sum/output/rust/src/shapes.rs
blob: 9bb32f4ffe9e5e2322ef9beeaafc8756979ec1a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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,
}