Struct ddc_hi::DisplayInfo
[−]
[src]
pub struct DisplayInfo { pub backend: Backend, pub id: String, pub manufacturer_id: Option<String>, pub model_id: Option<u16>, pub version: Option<(u8, u8)>, pub serial: Option<u32>, pub manufacture_year: Option<u8>, pub manufacture_week: Option<u8>, pub model_name: Option<String>, pub serial_number: Option<String>, pub edid_data: Option<Vec<u8>>, pub mccs_version: Option<Version>, pub mccs_database: Database, }
Identifying information about an attached display.
Not all information will be available, particularly on backends like WinAPI that do not support EDID.
Fields
backend: Backend
Identifies the backend or driver used to communicate with the display.
id: String
A unique identifier for the display, format is specific to the backend.
manufacturer_id: Option<String>
A three-character identifier of the manufacturer of the display.
model_id: Option<u16>
A number that identifies the product model.
version: Option<(u8, u8)>
The version and revision of the product.
serial: Option<u32>
Serial number of the device
manufacture_year: Option<u8>
Year the display was manufactured.
manufacture_week: Option<u8>
Week the display was manufactured.
model_name: Option<String>
The model name of the display.
serial_number: Option<String>
Human-readable serial number of the device.
edid_data: Option<Vec<u8>>
Raw EDID data provided by the display.
mccs_version: Option<Version>
MCCS VCP version code.
mccs_database: Database
MCCS VCP feature information.
Methods
impl DisplayInfo
[src]
pub fn new(backend: Backend, id: String) -> Self
[src]
Create an empty DisplayInfo
.
pub fn from_edid(
backend: Backend,
id: String,
edid_data: Vec<u8>
) -> Result<Self>
[src]
backend: Backend,
id: String,
edid_data: Vec<u8>
) -> Result<Self>
Creates a new DisplayInfo
from unparsed EDID data.
May fail to parse the EDID data.
pub fn from_capabilities(
backend: Backend,
id: String,
caps: &Capabilities
) -> Self
[src]
backend: Backend,
id: String,
caps: &Capabilities
) -> Self
Create a new DisplayInfo
from parsed capabilities.
pub fn update_from(&mut self, info: &DisplayInfo)
[src]
Merge in any missing information from another DisplayInfo
pub fn update_from_ddc<D: Ddc>(&mut self, ddc: &mut D) -> Result<(), D::Error>
[src]
Populate information from a DDC connection.
This will read the VCP Version (0xdf
) and fill in the mccs_database
.
This data will be incomplete compared to being filled in from a capability
string.
Trait Implementations
impl Clone for DisplayInfo
[src]
fn clone(&self) -> DisplayInfo
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more