pub struct Zoom(f64);Expand description
Zoom is an exponential scale that defines the zoom of the camera on the map.
We can derive the ZoomLevel from Zoom by using the [crate::coords::ZOOM_BOUNDS].
Tuple Fields
0: f64Implementations
sourceimpl Zoom
impl Zoom
pub fn scale_to_tile(&self, coords: &WorldTileCoords) -> f64
pub fn scale_to_zoom_level(&self, z: ZoomLevel) -> f64
pub fn scale_delta(&self, zoom: &Zoom) -> f64
pub fn level(&self) -> ZoomLevel
Trait Implementations
sourceimpl SignificantlyDifferent<Zoom> for Zoom
impl SignificantlyDifferent<Zoom> for Zoom
impl Copy for Zoom
Auto Trait Implementations
impl RefUnwindSafe for Zoom
impl Send for Zoom
impl Sync for Zoom
impl Unpin for Zoom
impl UnwindSafe for Zoom
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
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read more