pub enum PowerMode {
Off,
On,
Doze,
DozeSuspend,
// some variants omitted
}Expand description
The power mode of the display hardware.
Variants§
Off
The display is powered off. The hardware will not apply new display configs nor generate new VSync events.
All display devices must support this power mode.
On
The display is fully powered on.
All display devices must support this power mode.
Doze
The display is powered on and configured in a low power state that is suitable for presenting ambient information to the user, possibly with lower fidelity than ON, but with greater efficiency.
A display device must support both DOZE and DOZE_SUSPEND power
modes, or neither.
DozeSuspend
The display is configured as the same state in DOZE but may stop applying display updates from the client.
This is effectively a hint to the device that drawing to the display has been suspended and that the device must remain in a low power state and continue displaying its current contents indefinitely until the power mode changes.
A display device must support both DOZE and DOZE_SUSPEND power
modes, or neither. When both modes are supported, the display device
is allowed to not use the hint above, in which case DOZE_SUSPEND
is identical to DOZE.
Implementations§
Source§impl PowerMode
impl PowerMode
pub fn from_primitive(prim: u32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<PowerMode, D> for PowerMode
impl<D: ResourceDialect> Decode<PowerMode, D> for PowerMode
Source§impl Ord for PowerMode
impl Ord for PowerMode
Source§impl PartialOrd for PowerMode
impl PartialOrd for PowerMode
Source§impl TypeMarker for PowerMode
impl TypeMarker for PowerMode
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§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 moreSource§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.