pub struct MapResolution(/* private fields */);Implementations§
Source§impl MapResolution
impl MapResolution
Sourcepub fn new(units_per_pixel: f64) -> Result<Self, MapScaleError>
pub fn new(units_per_pixel: f64) -> Result<Self, MapScaleError>
Creates a positive map resolution.
§Errors
Returns MapScaleError::ResolutionNotFinite when the value is not finite.
Returns MapScaleError::ResolutionNotPositive when the value is zero or negative.
pub const fn units_per_pixel(self) -> f64
Trait Implementations§
Source§impl Clone for MapResolution
impl Clone for MapResolution
Source§fn clone(&self) -> MapResolution
fn clone(&self) -> MapResolution
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 moreSource§impl Debug for MapResolution
impl Debug for MapResolution
Source§impl Display for MapResolution
impl Display for MapResolution
Source§impl PartialEq for MapResolution
impl PartialEq for MapResolution
Source§fn eq(&self, other: &MapResolution) -> bool
fn eq(&self, other: &MapResolution) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MapResolution
impl PartialOrd for MapResolution
impl Copy for MapResolution
impl StructuralPartialEq for MapResolution
Auto Trait Implementations§
impl Freeze for MapResolution
impl RefUnwindSafe for MapResolution
impl Send for MapResolution
impl Sync for MapResolution
impl Unpin for MapResolution
impl UnsafeUnpin for MapResolution
impl UnwindSafe for MapResolution
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