#[derive(Clone, Copy, Debug, PartialEq)] pub enum Metric { Metre, Gram, Celsius, SquareMetre, } #[derive(Clone, Copy, Debug, PartialEq)] pub enum NonMetric { // Length Inch, Foot, Yard, Mile, // Weight Ounce, Pound, Stone, // Temperature Fahrenheit, // Area SquareInch, SquareFoot, Acre, SquareMile, } #[derive(Clone, Copy, Debug, PartialEq)] pub struct MetricQuantity { pub amount: f64, pub unit: Metric, } #[derive(Clone, Debug, PartialEq)] pub struct NonMetricQuantity { pub amount: f64, pub unit: NonMetric, }