Files
open-meteo-cli/src/current_weather_print_params.rs
T

42 lines
1015 B
Rust
Raw Normal View History

2023-06-08 23:10:21 +02:00
use crate::{speed_unit::SpeedUnit, temp_unit::TempUnit};
pub struct CurrentWeatherPrintParams {
pub all: bool,
pub is_day: bool,
pub temperature: bool,
2023-06-08 23:10:21 +02:00
pub temperature_unit: TempUnit,
pub windspeed: bool,
2023-06-08 23:10:21 +02:00
pub speed_unit: SpeedUnit,
pub winddirection: bool,
pub include_coords: bool,
pub include_city: bool,
pub clean: bool,
}
impl CurrentWeatherPrintParams {
pub fn new(
all: bool,
is_day: bool,
temperature: bool,
2023-06-08 23:10:21 +02:00
temperature_unit: TempUnit,
windspeed: bool,
2023-06-08 23:10:21 +02:00
speed_unit: SpeedUnit,
winddirection: bool,
include_coords: bool,
include_city: bool,
clean: bool,
) -> CurrentWeatherPrintParams {
CurrentWeatherPrintParams {
all,
is_day,
temperature,
2023-06-08 23:10:21 +02:00
temperature_unit,
windspeed,
2023-06-08 23:10:21 +02:00
speed_unit,
winddirection,
include_coords,
include_city,
clean,
}
}
}