pub struct DisplayLuminance {
pub max_nits: Option<f32>,
pub max_full_frame_nits: Option<f32>,
pub min_nits: Option<f32>,
pub sdr_white_nits: Option<f32>,
}Expand description
Absolute luminance levels in nits (cd/m²). Populated only on Windows (via
DXGI); None on every other platform.
Advisory: OS/EDID figures run optimistic. A 0.0 from the OS stays
Some(0.0); absence is None. These are achromatic (luminance = CIE Y), not a
per-color ceiling: a display can’t reach max_nits at a
saturated chromaticity. Pair them with DisplayChromaticity for gamut mapping.
Fields§
§max_nits: Option<f32>Peak luminance of a small patch, nits. DXGI MaxLuminance.
max_full_frame_nits: Option<f32>Sustained full-white-frame luminance, nits: the ceiling for a fully-lit
frame, which power/thermal limits can hold below the small-patch peak
max_nits. May equal max_nits if the OS reports no
distinct limit. Prefer it over max_nits for large bright regions; don’t
derive it from max_nits. DXGI MaxFullFrameLuminance.
min_nits: Option<f32>Minimum (black) luminance, nits. DXGI MinLuminance.
sdr_white_nits: Option<f32>Luminance the OS maps SDR reference white to, nits; moves with the
brightness slider. Converts between absolute nits and relative EDR headroom
(max_nits / sdr_white_nits). Read via the DISPLAYCONFIG_SDR_WHITE_LEVEL
query, separate from the other nits, so None only if that query fails.
Trait Implementations§
Source§impl Clone for DisplayLuminance
impl Clone for DisplayLuminance
Source§fn clone(&self) -> DisplayLuminance
fn clone(&self) -> DisplayLuminance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DisplayLuminance
impl Debug for DisplayLuminance
Source§impl Default for DisplayLuminance
impl Default for DisplayLuminance
Source§fn default() -> DisplayLuminance
fn default() -> DisplayLuminance
Source§impl<'de> Deserialize<'de> for DisplayLuminance
impl<'de> Deserialize<'de> for DisplayLuminance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for DisplayLuminance
impl PartialEq for DisplayLuminance
Source§fn eq(&self, other: &DisplayLuminance) -> bool
fn eq(&self, other: &DisplayLuminance) -> bool
self and other values to be equal, and is used by ==.