Struct DoNotDisturbSettings
pub struct DoNotDisturbSettings {
pub user_initiated_do_not_disturb: Option<bool>,
pub night_mode_initiated_do_not_disturb: Option<bool>,
/* private fields */
}
Expand description
Settings related to do-not-disturb (DND) mode.
Fields§
§user_initiated_do_not_disturb: Option<bool>
If true, the device is in do-not-disturb (DND) mode. Change this value if you’re directly responding to a user-initiated event.
Note that the device could still be in DND mode even if this is set to
false
, as [night_mode_initiated_do_not_disturb
] might be true
. To
actually disable DND mode, set both fields to false
.
To know whether DND is enabled, you need to do a boolean OR of both fields.
night_mode_initiated_do_not_disturb: Option<bool>
If true, the device is in do-not-disturb (DND) mode. Change this value if you’re trying to enable or disable DND based on a nightly schedule.
Note that the device could still be in DND mode even if this is set to
false
, as [user_initiated_do_not_disturb
] might be true
. Do not
set that field to false
unless you’re directly responding to a
user-initiated event.
To know whether DND is enabled, you need to do a boolean OR of both fields.
Trait Implementations§
§impl Clone for DoNotDisturbSettings
impl Clone for DoNotDisturbSettings
§fn clone(&self) -> DoNotDisturbSettings
fn clone(&self) -> DoNotDisturbSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for DoNotDisturbSettings
impl Debug for DoNotDisturbSettings
§impl<D> Decode<DoNotDisturbSettings, D> for DoNotDisturbSettingswhere
D: ResourceDialect,
impl<D> Decode<DoNotDisturbSettings, D> for DoNotDisturbSettingswhere
D: ResourceDialect,
§fn new_empty() -> DoNotDisturbSettings
fn new_empty() -> DoNotDisturbSettings
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for DoNotDisturbSettings
impl Default for DoNotDisturbSettings
§fn default() -> DoNotDisturbSettings
fn default() -> DoNotDisturbSettings
§impl<D> Encode<DoNotDisturbSettings, D> for &DoNotDisturbSettingswhere
D: ResourceDialect,
impl<D> Encode<DoNotDisturbSettings, D> for &DoNotDisturbSettingswhere
D: ResourceDialect,
§impl PartialEq for DoNotDisturbSettings
impl PartialEq for DoNotDisturbSettings
§impl TypeMarker for DoNotDisturbSettings
impl TypeMarker for DoNotDisturbSettings
§type Owned = DoNotDisturbSettings
type Owned = DoNotDisturbSettings
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for DoNotDisturbSettings
impl ValueTypeMarker for DoNotDisturbSettings
§type Borrowed<'a> = &'a DoNotDisturbSettings
type Borrowed<'a> = &'a DoNotDisturbSettings
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<DoNotDisturbSettings as TypeMarker>::Owned,
) -> <DoNotDisturbSettings as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<DoNotDisturbSettings as TypeMarker>::Owned, ) -> <DoNotDisturbSettings as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.