Struct ddc_macos::Monitor

source ·
pub struct Monitor { /* private fields */ }
Expand description

A handle to an attached monitor that allows the use of DDC/CI operations.

Implementations§

source§

impl Monitor

source

pub fn enumerate() -> Result<Vec<Self>, Error>

Enumerate all connected physical monitors returning Vec

source

pub fn description(&self) -> String

Physical monitor description string. If it cannot get the product’s name it will use the vendor number and model number to form a description

source

pub fn serial_number(&self) -> Option<String>

Serial number for this Monitor

source

pub fn product_name(&self) -> Option<String>

Product name for this Monitor, if available

source

pub fn edid(&self) -> Option<Vec<u8>>

Returns Extended display identification data (EDID) for this Monitor as raw bytes data

source

pub fn handle(&self) -> CGDisplay

CoreGraphics display handle for this monitor

Trait Implementations§

source§

impl DdcCommandRaw for Monitor

source§

fn execute_raw<'a>( &mut self, data: &[u8], out: &'a mut [u8], response_delay: Duration, ) -> Result<&'a mut [u8], Self::Error>

Executes a raw DDC/CI command. Read more
source§

impl DdcCommandRawMarker for Monitor

source§

fn set_sleep_delay(&mut self, delay: Delay)

Sets an internal Delay that must expire before the next command is attempted.
source§

impl DdcHost for Monitor

source§

type Error = Error

An error that can occur when communicating with a DDC device. Read more
source§

fn sleep(&mut self)

Wait for any previous commands to complete. Read more
source§

impl Debug for Monitor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for Monitor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl DdcCommandMarker for Monitor

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<D> Ddc for D

source§

fn capabilities_string(&mut self) -> Result<Vec<u8>, <D as DdcHost>::Error>

Retrieve the capability string from the device. Read more
source§

fn get_vcp_feature(&mut self, code: u8) -> Result<Value, <D as DdcHost>::Error>

Gets the current value of an MCCS VCP feature.
source§

fn set_vcp_feature( &mut self, code: u8, value: u16, ) -> Result<(), <D as DdcHost>::Error>

Sets a VCP feature to the specified value.
source§

fn save_current_settings(&mut self) -> Result<(), <D as DdcHost>::Error>

Instructs the device to save its current settings.
source§

fn get_timing_report(&mut self) -> Result<TimingMessage, <D as DdcHost>::Error>

Retrieves a timing report from the device.
source§

impl<D> DdcCommand for D

source§

fn execute<C>( &mut self, command: C, ) -> Result<<C as Command>::Ok, <D as DdcHost>::Error>
where C: Command,

Execute a DDC/CI command. See the commands module for all available commands. The return type is dependent on the executed command.
source§

fn checksum<II>(iter: II) -> u8
where II: IntoIterator<Item = u8>,

Computes a DDC/CI packet checksum
source§

fn encode_command<'a>(data: &[u8], packet: &'a mut [u8]) -> &'a [u8]

Encodes a DDC/CI command into a packet. Read more
source§

impl<D> DdcTable for D

source§

fn table_read(&mut self, code: u8) -> Result<Vec<u8>, <D as DdcHost>::Error>

Read a table value from the device.
source§

fn table_write( &mut self, code: u8, offset: u16, value: &[u8], ) -> Result<(), <D as DdcHost>::Error>

Write a table value to the device.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.