#[non_exhaustive]pub enum FplError {
Xml(Error),
Encoding(EncodingError),
IncompleteWaypoint {
identifier: String,
field: &'static str,
},
BadCoordinate {
identifier: String,
field: &'static str,
value: String,
},
UnknownRoutePoint {
identifier: String,
},
EmptyRoute,
}Expand description
Failure parsing a Garmin .fpl document.
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.
Xml(Error)
The bytes were not valid XML.
Encoding(EncodingError)
A text node could not be decoded.
IncompleteWaypoint
A waypoint-table entry was missing a required field.
Fields
BadCoordinate
A <lat>/<lon> value did not parse as a coordinate.
Fields
UnknownRoutePoint
A route point referenced an identifier absent from the waypoint table; a corridor must never be built from a hole.
EmptyRoute
The document carried no route points.
Trait Implementations§
Source§impl Error for FplError
impl Error for FplError
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 From<EncodingError> for FplError
impl From<EncodingError> for FplError
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for FplError
impl !UnwindSafe for FplError
impl Freeze for FplError
impl Send for FplError
impl Sync for FplError
impl Unpin for FplError
impl UnsafeUnpin for FplError
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