pub struct GeoPoint {
pub lat: Decimal,
pub lon: Decimal,
pub alt: Option<Decimal>,
}Expand description
Geo Point
Fields§
§lat: DecimalLatitude in decimal format
lon: DecimalLongitude in decimal format
alt: Option<Decimal>optional depth/altitude, in meters
Implementations§
Source§impl GeoPoint
impl GeoPoint
Sourcepub fn from(
lat: Decimal,
lon: Decimal,
alt: Option<Decimal>,
) -> Result<GeoPoint, Error>
pub fn from( lat: Decimal, lon: Decimal, alt: Option<Decimal>, ) -> Result<GeoPoint, Error>
Make Geo point from given coordinates.
latin decimals, must be inclusive -90 – 90lonin decimals, must be inclusive -180 – 180altin meters, must be more than -6378137 meters
§Errors
Returns Err in case of invalid coordinates
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GeoPoint
impl RefUnwindSafe for GeoPoint
impl Send for GeoPoint
impl Sync for GeoPoint
impl Unpin for GeoPoint
impl UnwindSafe for GeoPoint
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