pub struct Scale(/* private fields */);Expand description
A logical→physical scale factor (DPI) for one region. Strictly positive by construction:
a zero or negative factor would make the resolution math degenerate (every resolved radius
collapses to 0), so Self::new floors it at the smallest positive f32.
This guards only against zero/negative. A near-zero (sub-pixel) factor is almost always
an uninitialized-DPI caller bug that this type does not catch, so a backend should not
read factor() > 0 as “meaningfully large”.
Implementations§
Trait Implementations§
impl Copy for Scale
impl StructuralPartialEq for Scale
Auto Trait Implementations§
impl Freeze for Scale
impl RefUnwindSafe for Scale
impl Send for Scale
impl Sync for Scale
impl Unpin for Scale
impl UnsafeUnpin for Scale
impl UnwindSafe for Scale
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