summaryrefslogtreecommitdiffstats
path: root/src/options/config/temperature.rs
blob: 5bd8c0ee31311822b521b1e2521f8c6ec0d8327c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use indoc::indoc;
use serde::Deserialize;

use crate::args::TemperatureArgs;

use super::DefaultConfig;

#[derive(Clone, Debug, Default, Deserialize)]
pub(crate) struct TemperatureConfig {
    #[serde(flatten)]
    pub(crate) args: TemperatureArgs,
    pub(crate) temperature_type: Option<String>,
}

impl DefaultConfig for TemperatureConfig {
    fn default_config() -> String {
        let s = indoc! {r##"
            # The temperature unit. Supported values are "[c]elsius", "[f]ahrenheit", and "[k]elvin".
            # temperature_type = "celsius"
        "##};

        s.to_string()
    }
}