pub struct Info(/* private fields */);Expand description
Information about a display device.
This includes at least one EDID or DisplayID blob.
Use Info::parse_edid to create a Info from an EDID blob.
DisplayID blobs are not yet supported.
Implementations§
Source§impl Info
impl Info
Sourcepub fn parse_edid(data: &[u8]) -> Result<Self, ParseFailed>
pub fn parse_edid(data: &[u8]) -> Result<Self, ParseFailed>
Parse an EDID blob.
Sourcepub fn failure_msg(&self) -> Option<&CStr>
pub fn failure_msg(&self) -> Option<&CStr>
Get the failure messages for this blob.
None is returned if the blob conforms to the relevant specifications.
Sourcepub fn make(&self) -> Option<String>
pub fn make(&self) -> Option<String>
Get the make of the display device.
This is the manufacturer name, either company name or PNP ID. This string is informational and not meant to be used in programmatic decisions, configuration keys, etc.
The string is in UTF-8 and may contain any characters except ASCII control codes.
None is returned if the information is not available.
Sourcepub fn model(&self) -> Option<String>
pub fn model(&self) -> Option<String>
Get the model of the display device.
This is the product name/model string or product number. This string is informational and not meant to be used in programmatic decisions, configuration keys, etc.
The string is in UTF-8 and may contain any characters except ASCII control codes.
None is returned if the information is not available.
Sourcepub fn serial(&self) -> Option<String>
pub fn serial(&self) -> Option<String>
Get the serial of the display device.
This is the product serial string or the serial number. This string is informational and not meant to be used in programmatic decisions, configuration keys, etc.
The string is in UTF-8 and may contain any characters except ASCII control codes.
None is returned if the information is not available.
Sourcepub fn hdr_static_metadata(&self) -> HdrStaticMetadata
Available on crate features v0_2 or v0_3 only.
pub fn hdr_static_metadata(&self) -> HdrStaticMetadata
v0_2 or v0_3 only.Get HDR static metadata support information as defined in ANSI/CTA-861-H as HDR Static Metadata Data Block.
When HDR static metadata does not exist, all luminance fields are zero and only traditional_sdr is flagged as supported.
Sourcepub fn default_color_primaries(&self) -> ColorPrimaries
Available on crate features v0_2 or v0_3 only.
pub fn default_color_primaries(&self) -> ColorPrimaries
v0_2 or v0_3 only.Get display color primaries and default white point
Get the parameters of the default RGB colorimetry mode which is always supported. Primaries for monochrome displays might be all zeroes.
These primaries might not be display’s physical primaries, but only the primaries of the default RGB colorimetry signal when using IT Video Format (ANSI/CTA-861-H, Section 5).
Sourcepub fn supported_signal_colorimetry(&self) -> SupportedSignalColorimetry
Available on crate features v0_2 or v0_3 only.
pub fn supported_signal_colorimetry(&self) -> SupportedSignalColorimetry
v0_2 or v0_3 only.Get signal colorimetry encodings supported by the display
These signal colorimetry encodings are supported in addition to the display’s default RGB colorimetry. When you wish to use one of the additional encodings, they need to be explicitly enabled in the video signal. How to do that is specific to the signalling used, e.g. HDMI.
Signal colorimetry encoding provides the color space that the signal is encoded for. This includes primary and white point chromaticities, and the YCbCr-RGB conversion if necessary. Also the transfer function is implied unless explicitly set otherwise, e.g. with HDR static metadata. See ANSI/CTA-861-H for details.
The signal color volume can be considerably larger than the physically displayable color volume.
Sourcepub fn default_gamma(&self) -> Option<f32>
Available on crate features v0_2 or v0_3 only.
pub fn default_gamma(&self) -> Option<f32>
v0_2 or v0_3 only.Get display default transfer characteristic exponent (gamma)
This should be the display gamma value when the display has been reset to its factory defaults, and it is driven with the default RGB colorimetry.
Returns None when unknown.