#[non_exhaustive]pub enum CoordinateError {
InvalidShape,
NotNumber {
component: &'static str,
},
NotFinite {
component: &'static str,
},
LatitudeOutOfRange {
value: f64,
},
LongitudeOutOfRange {
value: f64,
},
}Expand description
Errors produced while parsing a JSON coordinate pair.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidShape
The coordinate was not a two-element JSON array.
NotNumber
A coordinate component was not a JSON number.
NotFinite
A coordinate component was not finite.
LatitudeOutOfRange
Latitude was outside its valid range.
LongitudeOutOfRange
Longitude was outside its valid range.
Trait Implementations§
Source§impl Debug for CoordinateError
impl Debug for CoordinateError
Source§impl Display for CoordinateError
impl Display for CoordinateError
Source§impl Error for CoordinateError
impl Error for CoordinateError
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()
Source§impl PartialEq for CoordinateError
impl PartialEq for CoordinateError
impl StructuralPartialEq for CoordinateError
Auto Trait Implementations§
impl Freeze for CoordinateError
impl RefUnwindSafe for CoordinateError
impl Send for CoordinateError
impl Sync for CoordinateError
impl Unpin for CoordinateError
impl UnsafeUnpin for CoordinateError
impl UnwindSafe for CoordinateError
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