Struct dms_coordinates::DMS 
source · [−]pub struct DMS { /* private fields */ }Expand description
DMS Structure to manipulate
D°M’S’’ coordinates
Implementations
sourceimpl DMS
 
impl DMS
sourcepub fn new(
    degrees: i32, 
    minutes: i32, 
    seconds: f64, 
    bearing: char
) -> Result<DMS, Error>
 
pub fn new(
    degrees: i32, 
    minutes: i32, 
    seconds: f64, 
    bearing: char
) -> Result<DMS, Error>
Builds new D°M'S'' coordinates
sourcepub fn from_decimal_degrees(ddeg: f64, is_lat: bool) -> DMS
 
pub fn from_decimal_degrees(ddeg: f64, is_lat: bool) -> DMS
Buils new D°M'S'' coordinates
from given decimal coordinates.
is_lat: true to express result as latitude coordinates,
longitude otherwise.
sourcepub fn get_degrees(&self) -> i32
 
pub fn get_degrees(&self) -> i32
Returns D°
sourcepub fn get_minutes(&self) -> i32
 
pub fn get_minutes(&self) -> i32
Returns M’
sourcepub fn get_seconds(&self) -> f64
 
pub fn get_seconds(&self) -> f64
Returns S’’
sourcepub fn get_bearing(&self) -> char
 
pub fn get_bearing(&self) -> char
Returns bearing
sourcepub fn to_decimal_degrees(&self) -> f64
 
pub fn to_decimal_degrees(&self) -> f64
Converts D°M'S'' coordinates to Decimal Degrees coordinates
Trait Implementations
impl Copy for DMS
impl StructuralPartialEq for DMS
Auto Trait Implementations
impl RefUnwindSafe for DMS
impl Send for DMS
impl Sync for DMS
impl Unpin for DMS
impl UnwindSafe for DMS
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
sourceimpl<T> ToOwned for T where
    T: Clone, 
 
impl<T> ToOwned for T where
    T: Clone, 
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
 
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more