feat: 支持记住显示器配置。

This commit is contained in:
2023-05-11 14:13:14 +08:00
parent 8b124f8182
commit 3a23e1760b
3 changed files with 139 additions and 4 deletions

View File

@ -34,3 +34,15 @@ impl DisplayState {
}
}
}
#[derive(Clone, Serialize, Deserialize, Debug)]
pub struct DisplayStateWrapper {
pub version: u8,
pub states: Vec<DisplayState>,
}
impl DisplayStateWrapper {
pub fn new(states: Vec<DisplayState>) -> Self {
Self { version: 1, states }
}
}