1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use super::Deserialize;

pub type Family = String;
pub type Brand = String;
pub type Model = String;

/// Describes the `Family`, `Brand` and `Model` of a `Device`
#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq)]
pub struct Device {
    pub family: Family,
    pub brand: Option<Brand>,
    pub model: Option<Model>,
}

impl Default for Device {
    fn default() -> Device {
        Device {
            family: "Other".to_string(),
            brand: None,
            model: None,
        }
    }
}