#[non_exhaustive]pub enum DprsError {
MissingCrcPrefix,
TooShort {
got: usize,
},
MalformedCoordinates,
LatitudeOutOfRange {
got: f64,
},
LongitudeOutOfRange {
got: f64,
},
InvalidCallsign {
reason: &'static str,
},
CrcMismatch {
computed: u16,
on_wire: u16,
},
}Expand description
DPRS sentence parser errors.
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.
MissingCrcPrefix
Sentence does not start with $$CRC.
TooShort
Sentence is shorter than the minimum viable length.
MalformedCoordinates
Lat/lon field couldn’t be parsed.
LatitudeOutOfRange
Latitude out of range -90.0..=90.0 or NaN.
LongitudeOutOfRange
Longitude out of range -180.0..=180.0 or NaN.
InvalidCallsign
Callsign field fails Callsign::try_from_str.
CrcMismatch
CRC mismatch — computed vs on-wire disagree.
Trait Implementations§
Source§impl Error for DprsError
impl Error for DprsError
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 DprsError
Auto Trait Implementations§
impl Freeze for DprsError
impl RefUnwindSafe for DprsError
impl Send for DprsError
impl Sync for DprsError
impl Unpin for DprsError
impl UnwindSafe for DprsError
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