pub struct Monitor {
pub id: u64,
pub name: String,
pub rect: [i32; 4],
pub work: [i32; 4],
pub dpi: u32,
pub refresh_mhz: u32,
pub primary: bool,
}Expand description
one monitor
Fields§
§id: u64stable while the monitor stays connected (Windows: a hash of its device name, X11 the RandR monitor’s name atom, Wayland the output’s global name, browser / Android an index)
name: Stringthe system’s name (“\.\DISPLAY1”, “HDMI-1”, “rdp-0”); “” when unknown
rect: [i32; 4]x, y, w, h in desktop units: physical pixels on Windows, X11 and Android; the compositor’s logical units on Wayland; CSS pixels in the browser
work: [i32; 4]the part windows should use (without taskbars, docks, panels); = rect where unknown
dpi: u3296 = 100 %
refresh_mhz: u32refresh rate in mHz (60000 = 60 Hz), 0 = unknown
primary: boolthe primary monitor (exactly one in a non-empty list)
Trait Implementations§
impl Eq for Monitor
impl StructuralPartialEq for Monitor
Auto Trait Implementations§
impl Forget for Monitor
impl Freeze for Monitor
impl RefUnwindSafe for Monitor
impl Send for Monitor
impl Sync for Monitor
impl Unpin for Monitor
impl UnsafeUnpin for Monitor
impl UnwindSafe for Monitor
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