settings_do_not_disturb/
types.rs1use serde::{Deserialize, Serialize};
6use settings_common::inspect::event::Nameable;
7
8#[derive(PartialEq, Debug, Clone, Copy, Serialize, Deserialize)]
9pub struct DoNotDisturbInfo {
10 pub user_dnd: Option<bool>,
11 pub night_mode_dnd: Option<bool>,
12}
13
14impl DoNotDisturbInfo {
15 pub(crate) const fn new(user_dnd: bool, night_mode_dnd: bool) -> DoNotDisturbInfo {
16 DoNotDisturbInfo { user_dnd: Some(user_dnd), night_mode_dnd: Some(night_mode_dnd) }
17 }
18}
19
20impl Nameable for DoNotDisturbInfo {
21 const NAME: &str = "DoNotDisturb";
22}