pub enum Error {
InvalidAngle(f64, f64),
InvalidLatitudeDegrees(i32),
InvalidLongitudeDegrees(i32),
InvalidMinutes(u32),
InvalidSeconds(f32),
InvalidCharacter(char, String),
InvalidWhitespace(String),
InvalidNumericFormat(String),
InvalidCoordinate,
InvalidUrnScheme,
}Expand description
Errors that can occur when constructing or parsing coordinate values.
Variants§
InvalidAngle(f64, f64)
Generic angle out of range; used internally before conversion to a typed error.
InvalidLatitudeDegrees(i32)
Latitude degrees outside the valid range −90..=90.
InvalidLongitudeDegrees(i32)
Longitude degrees outside the valid range −180..=180.
InvalidMinutes(u32)
Minutes value ≥ 60 (valid range is 0..59).
InvalidSeconds(f32)
Seconds value < 0.0 or ≥ 60.0 (valid range is 0.0..60.0).
InvalidCharacter(char, String)
An unexpected character was encountered while parsing.
InvalidWhitespace(String)
Invalid whitespace between DMS components.
InvalidNumericFormat(String)
An improperly formatted numeric value.
InvalidCoordinate
Unable to create a new Coordinate value.
InvalidUrnScheme
The URI scheme was not geo: as required by RFC 5870.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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