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
Fields
§
responder: NightModeWatchResponder
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.
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