pub struct Mode {
pub active_area: SizeU,
pub refresh_rate_millihertz: u32,
pub flags: ModeFlags,
}
Expand description
Describes an operational mode for a display device attached to the system.
The operational parameters that make up a mode description must be updated atomically, using a resource-intensive “mode setting” operation. Parameters that can be changed quickly, such as brightness and contrast, do not belong in a mode description.
Fields§
§active_area: SizeU
The dimensions of the displayed image, in pixels.
This describes the image data sent to the display, which is also called the “active area” or “active pixels” in raster scan terminology. Despite the name, some of the “active pixels” may not actually be shown to the user, for example due to corners or notches.
Valid modes have non-empty active areas.
refresh_rate_millihertz: u32
Number of images transmitted to the display in 1,000 seconds.
This quantity is also known as the display’s frame rate, or the display’s vertical refresh rate. The rate is measured in millihertz (mHz).
Valid modes have positive refresh rates.
flags: ModeFlags
Trait Implementations§
Source§impl<D: ResourceDialect> Decode<Mode, D> for Mode
impl<D: ResourceDialect> Decode<Mode, D> for Mode
Source§impl<D: ResourceDialect, T0: Encode<SizeU, D>, T1: Encode<u32, D>, T2: Encode<ModeFlags, D>> Encode<Mode, D> for (T0, T1, T2)
impl<D: ResourceDialect, T0: Encode<SizeU, D>, T1: Encode<u32, D>, T2: Encode<ModeFlags, D>> Encode<Mode, D> for (T0, T1, T2)
Source§impl TypeMarker for Mode
impl TypeMarker for Mode
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
.§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.Source§impl ValueTypeMarker for Mode
impl ValueTypeMarker for Mode
impl Persistable for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
Blanket Implementations§
§impl<T> Body for Twhere
T: Persistable,
impl<T> Body for Twhere
T: Persistable,
§type MarkerAtTopLevel = T
type MarkerAtTopLevel = T
§type MarkerInResultUnion = T
type MarkerInResultUnion = T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)