pub struct MapPoint { /* private fields */ }
Expand description
Compact internal representation of a geographical location on a (flat) map.
Implementations§
Source§impl MapPoint
impl MapPoint
pub const fn new(lat: LatCoord, lng: LngCoord) -> Self
pub const fn lat(self) -> LatCoord
pub const fn lng(self) -> LngCoord
pub fn is_valid(self) -> bool
pub fn to_lat_lng_rad(self) -> (f64, f64)
pub fn to_lat_lng_deg(self) -> (f64, f64)
pub fn from_lat_lng_deg<LAT: Into<f64>, LNG: Into<f64>>( lat: LAT, lng: LNG, ) -> Self
pub fn try_from_lat_lng_deg<LAT: Into<f64>, LNG: Into<f64>>( lat: LAT, lng: LNG, ) -> Result<Self, CoordRangeError>
Trait Implementations§
impl Copy for MapPoint
impl Eq for MapPoint
impl StructuralPartialEq for MapPoint
Auto Trait Implementations§
impl Freeze for MapPoint
impl RefUnwindSafe for MapPoint
impl Send for MapPoint
impl Sync for MapPoint
impl Unpin for MapPoint
impl UnwindSafe for MapPoint
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more