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 moreimpl Copy for DisplayLuminance
Source§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 ==.Source§impl Serialize for DisplayLuminance
impl Serialize for DisplayLuminance
impl StructuralPartialEq for DisplayLuminance
Auto Trait Implementations§
impl Freeze for DisplayLuminance
impl RefUnwindSafe for DisplayLuminance
impl Send for DisplayLuminance
impl Sync for DisplayLuminance
impl Unpin for DisplayLuminance
impl UnsafeUnpin for DisplayLuminance
impl UnwindSafe for DisplayLuminance
Blanket Implementations§
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more