32 lines
706 B
Rust
32 lines
706 B
Rust
use std::fmt;
|
|
|
|
// --------------------
|
|
// Enums
|
|
// --------------------
|
|
#[derive(Debug,PartialEq,Eq,Copy,Clone)]
|
|
pub enum TemperatureUnits {
|
|
Metric,
|
|
Imperial,
|
|
}
|
|
|
|
impl fmt::Display for TemperatureUnits {
|
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
match self {
|
|
TemperatureUnits::Metric => write!(f, "Metric"),
|
|
TemperatureUnits::Imperial => write!(f, "Imperial"),
|
|
}
|
|
}
|
|
}
|
|
|
|
// --------------------
|
|
// Application options
|
|
// --------------------
|
|
#[derive(Debug,Clone)]
|
|
pub struct AppOptions {
|
|
pub weather_units: TemperatureUnits,
|
|
pub weather_station: String,
|
|
pub music_progress: bool,
|
|
pub debug: bool,
|
|
pub debug_modules: bool,
|
|
}
|