pub struct Zoom(Bounded<ZoomBounds>);Expand description
A newtype rather than a Bounded<ZoomBounds> alias so Zoom::unity can
be inherent; the clamping and the total order are Bounded’s.
Tuple Fields§
§0: Bounded<ZoomBounds>Implementations§
Source§impl Zoom
impl Zoom
Sourcepub const WORKED_MIN: Self
pub const WORKED_MIN: Self
The band the user’s own zoom — the wheel, a pinch, a keyboard step — lands in. Deliberately narrower than the type’s own bounds, which the framing helpers are allowed to use in full.
pub const WORKED_MAX: Self
pub const fn new(scale: f32) -> Self
pub const fn get(self) -> f32
pub const fn unity() -> Self
pub const fn min_value() -> Self
pub const fn max_value() -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Zoom
impl<'de> Deserialize<'de> for Zoom
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Zoom
impl Ord for Zoom
Source§impl PartialOrd for Zoom
impl PartialOrd for Zoom
impl Copy for Zoom
impl Eq for Zoom
impl StructuralPartialEq for Zoom
Auto Trait Implementations§
impl Freeze for Zoom
impl RefUnwindSafe for Zoom
impl Send for Zoom
impl Sync for Zoom
impl Unpin for Zoom
impl UnsafeUnpin for Zoom
impl UnwindSafe for Zoom
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.