webterm_core/models/
device_id.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
pub struct DeviceId {
    device_name: String,
    device_subname: String,
}

impl DeviceId {
    pub fn new(device_name: String, device_subname: String) -> Self {
        Self {
            device_name,
            device_subname,
        }
    }

    pub fn name(&self) -> &str {
        &self.device_name
    }

    pub fn subname(&self) -> &str {
        &self.device_subname
    }
}