pub struct LatLng {
pub degrees: URational,
pub minutes: URational,
pub seconds: URational,
}Expand description
Latitude or longitude expressed as degrees / minutes / seconds.
Fields§
§degrees: URational§minutes: URational§seconds: URationalImplementations§
Source§impl LatLng
impl LatLng
pub const fn new( degrees: URational, minutes: URational, seconds: URational, ) -> Self
Sourcepub fn to_decimal_degrees(&self) -> Option<f64>
pub fn to_decimal_degrees(&self) -> Option<f64>
Convert to decimal degrees. Returns None if any component has a zero
denominator.
Sourcepub fn try_from_decimal_degrees(degrees: f64) -> Result<Self, ConvertError>
pub fn try_from_decimal_degrees(degrees: f64) -> Result<Self, ConvertError>
Construct from decimal degrees. Rejects NaN / ±inf and values whose
magnitude exceeds 180° with ConvertError::InvalidDecimalDegrees.
Trait Implementations§
impl Copy for LatLng
impl Eq for LatLng
impl StructuralPartialEq for LatLng
Auto Trait Implementations§
impl Freeze for LatLng
impl RefUnwindSafe for LatLng
impl Send for LatLng
impl Sync for LatLng
impl Unpin for LatLng
impl UnsafeUnpin for LatLng
impl UnwindSafe for LatLng
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