#[derive(Clone, Copy, Debug, PartialEq)] pub enum Metric { Metre, Gram, Celcius, } #[derive(Clone, Copy, Debug, PartialEq)] pub enum NonMetric { // Length Inch, Foot, Yard, Mile, // Weight Ounce, Pound, Stone, // Temperature Fahrenheit, } #[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, }