pub struct RefreshRate(/* private fields */);Expand description
Display refresh rate in Hz, 1.0..=480.0. Upper bound exceeds any
shipping consumer panel.
Implementations§
Source§impl RefreshRate
impl RefreshRate
Sourcepub fn new(value: f32) -> Result<Self, OutOfRange>
pub fn new(value: f32) -> Result<Self, OutOfRange>
Constructs a new value, validating the range.
§Errors
Returns OutOfRange if value is NaN or outside the
valid range.
Sourcepub const fn new_unchecked(value: f32) -> Self
pub const fn new_unchecked(value: f32) -> Self
Constructs without validation.
The caller must ensure value lies within the valid range.
Trait Implementations§
Source§impl Clone for RefreshRate
impl Clone for RefreshRate
Source§fn clone(&self) -> RefreshRate
fn clone(&self) -> RefreshRate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RefreshRate
Source§impl Debug for RefreshRate
impl Debug for RefreshRate
Source§impl Display for RefreshRate
impl Display for RefreshRate
Source§impl PartialEq for RefreshRate
impl PartialEq for RefreshRate
Source§impl PartialOrd for RefreshRate
impl PartialOrd for RefreshRate
impl StructuralPartialEq for RefreshRate
Auto Trait Implementations§
impl Freeze for RefreshRate
impl RefUnwindSafe for RefreshRate
impl Send for RefreshRate
impl Sync for RefreshRate
impl Unpin for RefreshRate
impl UnsafeUnpin for RefreshRate
impl UnwindSafe for RefreshRate
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