pub struct DMS { /* private fields */ }Expand description
Reader and Writer for degrees, minutes, seconds format,
e.g 50°53'39.70''N 10°57'19.23''E.
Degrees, minutes, and seconds are parsed with any number of digits. Optional space characters are accepted between latitude and longitude, between numeric values and the ‘°’, “'”, “''”, and the hemisphere letters.
Implementations§
Source§impl DMS
impl DMS
Sourcepub fn from_reader(reader: &dyn Reader) -> Self
pub fn from_reader(reader: &dyn Reader) -> Self
Construct DMS type from Reader’s Coordinates.
Trait Implementations§
Source§impl FromStr for DMS
impl FromStr for DMS
Source§fn from_str(input: &str) -> Result<Self, Self::Err>
fn from_str(input: &str) -> Result<Self, Self::Err>
Construct DMS type from string slice.
§Errors
Error::UnknownInputFormatError::LatitudeOutOfRangeError::LongitudeOutOfRangeError::DegreesOutOfRangeError::MinutesOutOfRangeError::SecondsOutOfRange
§Examples
use coordfmt::DMS;
use std::str::FromStr;
let a = DMS::from_str("50°53'39.70''N 10°57'19.23''E").unwrap();
let b = "50°53'39.70''N 10°57'19.23''E".parse::<DMS>().unwrap();Source§impl Reader for DMS
impl Reader for DMS
Source§fn get_coordinates(&self) -> Coordinates
fn get_coordinates(&self) -> Coordinates
Retrieve base representation.
impl Writer for DMS
Auto Trait Implementations§
impl Freeze for DMS
impl RefUnwindSafe for DMS
impl Send for DMS
impl Sync for DMS
impl Unpin for DMS
impl UnwindSafe for DMS
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