Struct DisplaySettings
pub struct DisplaySettings {
pub auto_brightness: Option<bool>,
pub brightness_value: Option<f32>,
pub low_light_mode: Option<LowLightMode>,
pub screen_enabled: Option<bool>,
pub theme: Option<Theme>,
pub adjusted_auto_brightness: Option<f32>,
/* private fields */
}
Expand description
DisplaySettings are used to determine the output state of the display. The display can be toggled between two modes, auto-brightness on and auto-brightness off.
Adjusted_auto_brightness is used to set a specific brightness level for the current lighting conditions. Auto-brightness will continue to make the screen darker and brighter as the surrounding light changes.
Brightness_value is used in manual mode to set a specific brightness level for the screen. This level will be maintained while in manual mode.
Fields§
§auto_brightness: Option<bool>
Auto brightness enabled.
brightness_value: Option<f32>
Manually set brightness value [0.0 - 1.0]. Not a number, infinity or negative infinity will cause SetDisplayInfo to fail with INVALID_VALUE.
low_light_mode: Option<LowLightMode>
The low light mode state of the device.
screen_enabled: Option<bool>
Whether the screen is enabled.
theme: Option<Theme>
Theme to be used for the device’s user interface.
adjusted_auto_brightness: Option<f32>
Brightness value to adjust auto-brightness to [0.0 - 1.0].
Trait Implementations§
§impl Clone for DisplaySettings
impl Clone for DisplaySettings
§fn clone(&self) -> DisplaySettings
fn clone(&self) -> DisplaySettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for DisplaySettings
impl Debug for DisplaySettings
§impl<D> Decode<DisplaySettings, D> for DisplaySettingswhere
D: ResourceDialect,
impl<D> Decode<DisplaySettings, D> for DisplaySettingswhere
D: ResourceDialect,
§fn new_empty() -> DisplaySettings
fn new_empty() -> DisplaySettings
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl Default for DisplaySettings
impl Default for DisplaySettings
§fn default() -> DisplaySettings
fn default() -> DisplaySettings
§impl<D> Encode<DisplaySettings, D> for &DisplaySettingswhere
D: ResourceDialect,
impl<D> Encode<DisplaySettings, D> for &DisplaySettingswhere
D: ResourceDialect,
§impl PartialEq for DisplaySettings
impl PartialEq for DisplaySettings
§impl TypeMarker for DisplaySettings
impl TypeMarker for DisplaySettings
§type Owned = DisplaySettings
type Owned = DisplaySettings
§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 DisplaySettings
impl ValueTypeMarker for DisplaySettings
§type Borrowed<'a> = &'a DisplaySettings
type Borrowed<'a> = &'a DisplaySettings
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<DisplaySettings as TypeMarker>::Owned,
) -> <DisplaySettings as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<DisplaySettings as TypeMarker>::Owned, ) -> <DisplaySettings as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.