// Generated by hobgoblin. /// A 2D shape. #[derive(Debug, PartialEq)] pub enum Shape { Rectangle(crate::shapes::Rectangle), Triangle(crate::shapes::Triangle), } impl ::std::convert::From for crate::shapes::Shape { fn from(value: crate::shapes::Rectangle) -> Self { Self::Rectangle(value) } } impl ::std::convert::From for crate::shapes::Shape { fn from(value: crate::shapes::Triangle) -> Self { Self::Triangle(value) } } #[derive(Debug, PartialEq)] pub struct Rectangle { pub width: ::core::primitive::i32, pub height: ::core::primitive::i32, } #[derive(Debug, PartialEq)] pub struct Triangle { pub width: ::core::primitive::i32, pub height: ::core::primitive::i32, }