pub struct WindowsDisplayId { /* private fields */ }Expand description
A Windows-specific unique identifier for a display.
This ID is based on the device path of the display.
Implementations§
Source§impl WindowsDisplayId
impl WindowsDisplayId
Sourcepub fn from_handle(handle: HMONITOR) -> Result<Self, WindowsError>
pub fn from_handle(handle: HMONITOR) -> Result<Self, WindowsError>
Creates a WindowsDisplayId from a Windows HMONITOR handle.
§Errors
Returns a WindowsError if GetMonitorInfoW fails.
Sourcepub fn device_name(&self) -> &OsStr
pub fn device_name(&self) -> &OsStr
Get device identification string. This is also called device path. e.g. `\?\DISPLAY1…“
See Microsoft’s documentation for more details.
Trait Implementations§
Source§impl Clone for WindowsDisplayId
impl Clone for WindowsDisplayId
Source§fn clone(&self) -> WindowsDisplayId
fn clone(&self) -> WindowsDisplayId
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowsDisplayId
impl Debug for WindowsDisplayId
Source§impl From<WindowsDisplayId> for DisplayId
impl From<WindowsDisplayId> for DisplayId
Source§fn from(value: PlatformDisplayId) -> Self
fn from(value: PlatformDisplayId) -> Self
Converts to this type from the input type.
Source§impl Hash for WindowsDisplayId
impl Hash for WindowsDisplayId
Source§impl PartialEq for WindowsDisplayId
impl PartialEq for WindowsDisplayId
impl Eq for WindowsDisplayId
Auto Trait Implementations§
impl Freeze for WindowsDisplayId
impl RefUnwindSafe for WindowsDisplayId
impl Send for WindowsDisplayId
impl Sync for WindowsDisplayId
impl Unpin for WindowsDisplayId
impl UnwindSafe for WindowsDisplayId
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
Mutably borrows from an owned value. Read more