summaryrefslogtreecommitdiffstats
path: root/src/config/icons/icons_raw.rs
blob: 91d4e6f0c62184dd0255a4b8a274516a8bd72f73 (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
25
26
27
28
29
30
31
use serde_derive::Deserialize;
use std::collections::HashMap;

#[derive(Debug, Clone, Deserialize)]
pub struct DefaultIcons {
    #[serde(default)]
    pub file: String,
    #[serde(default)]
    pub directory: String,
}

#[derive(Debug, Clone, Deserialize)]
pub struct IconsRaw {
    #[serde(default)]
    pub directory_exact: HashMap<String, String>,
    #[serde(default)]
    pub file_exact: HashMap<String, String>,
    #[serde(default)]
    pub ext: HashMap<String, String>,
    #[serde(default)]
    pub defaults: DefaultIcons,
}

impl std::default::Default for DefaultIcons {
    fn default() -> Self {
        Self {
            file: "".to_string(),
            directory: "".to_string(),
        }
    }
}