pub struct Monitor { /* private fields */ }
Implementations
sourceimpl Monitor
impl Monitor
sourcepub fn resolution(&self) -> [u32; 2]
pub fn resolution(&self) -> [u32; 2]
Returns the monitor’s resolution.
sourcepub fn position(&self) -> [i32; 2]
pub fn position(&self) -> [i32; 2]
Returns the top-left corner position of the monitor relative to the larger full screen area.
sourcepub fn refresh_rate(&self) -> f32
pub fn refresh_rate(&self) -> f32
The monitor refresh rate used by the system.
sourcepub fn modes(&self) -> Vec<MonitorMode>
pub fn modes(&self) -> Vec<MonitorMode>
Returns a list of MonitorMode
’s supported by this monitor.
sourcepub fn is_primary(&self) -> bool
pub fn is_primary(&self) -> bool
Returns true
if it is the systems primary monitor.
sourcepub fn is_current(&self) -> bool
pub fn is_current(&self) -> bool
Returns true
if it is the current monitor in use.
sourcepub fn optimal_mode(&self) -> MonitorMode
pub fn optimal_mode(&self) -> MonitorMode
Get the most optimal mode for this monitor.
Priority
- Resolution (Higher than the monitor are less favorable)
- Aspect Ratio
- Refresh Rate
- Bit Depth
Trait Implementations
sourceimpl TryFrom<MonitorHandle> for Monitor
impl TryFrom<MonitorHandle> for Monitor
impl Eq for Monitor
impl StructuralEq for Monitor
impl StructuralPartialEq for Monitor
Auto Trait Implementations
impl !RefUnwindSafe for Monitor
impl Send for Monitor
impl Sync for Monitor
impl Unpin for Monitor
impl !UnwindSafe for Monitor
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more