Struct ofdb_entities::geo::MapPoint
source · [−]pub struct MapPoint { /* private fields */ }Expand description
Compact internal representation of a geographical location on a (flat) map.
Implementations
sourceimpl 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
sourceimpl PartialEq<MapPoint> for MapPoint
impl PartialEq<MapPoint> for MapPoint
impl Copy for MapPoint
impl Eq for MapPoint
impl StructuralEq for MapPoint
impl StructuralPartialEq for MapPoint
Auto Trait Implementations
impl RefUnwindSafe for MapPoint
impl Send for MapPoint
impl Sync for MapPoint
impl Unpin for MapPoint
impl UnwindSafe for MapPoint
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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