pub enum NightModeRequest {
Watch {
responder: NightModeWatchResponder,
},
Set {
settings: NightModeSettings,
responder: NightModeSetResponder,
},
}
Expand description
Modify or watch Night Mode setting. Night mode puts the device in a restricted mode which can be overrided if the user prefers. During night mode, the following settings apply as per night mode parameters:
- DoNotDisturb is enabled/not.
- System volume is set to an override maximum.
- LED Brightness is set to an overridable maximum.
- Sleep mode is enabled/not.
Supported SettingsEpitaph enums: REQUEST_NOT_SUPPORTED, INTERNAL_SERVICE_ERROR, PERSISTENT_STORAGE_ERROR
Variants§
Watch
Gets the current NightModeSettings
. Returns immediately on first
call; subsequent calls return when the values change.
If this call fails, it is considered a fatal error and the channel will be closed.
Fields
§
responder: NightModeWatchResponder
Set
Sets NightModeSettings
settings. Any field not explicitly set in
the table performs a no-op, and will not make any changes.
Implementations§
Source§impl NightModeRequest
impl NightModeRequest
pub fn into_watch(self) -> Option<NightModeWatchResponder>
pub fn into_set(self) -> Option<(NightModeSettings, NightModeSetResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NightModeRequest
impl !RefUnwindSafe for NightModeRequest
impl Send for NightModeRequest
impl Sync for NightModeRequest
impl Unpin for NightModeRequest
impl !UnwindSafe for NightModeRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more