pub enum NmeaError<'a> {
Utf8DecodingError,
ChecksumMismatch {
calculated: u8,
found: u8,
},
WrongSentenceHeader {
expected: &'a [u8],
found: &'a [u8],
},
ParsingError(Err<Error<&'a [u8]>>),
SentenceLength(usize),
Unsupported(SentenceType),
EmptyNavConfig,
InvalidGsvSentenceNum,
}
Variants
Utf8DecodingError
The provided input was not a proper UTF-8 string
ChecksumMismatch
The checksum of the sentence was corrupt or wrong
WrongSentenceHeader
For some reason a sentence was passed to the wrong sentence specific parser, this error should never happen. First slice is the expected header, second is the found one
ParsingError(Err<Error<&'a [u8]>>)
The sentence could not be parsed because its format was invalid
SentenceLength(usize)
The sentence was too long to be parsed, our current limit is SENTENCE_MAX_LEN
characters
Unsupported(SentenceType)
The sentence has and maybe will never be implemented
EmptyNavConfig
The provided navigation configuration was empty and thus invalid
InvalidGsvSentenceNum
invalid senetence number field in nmea sentence of type GSV
Trait Implementations
sourceimpl<'a> Error for NmeaError<'a>
impl<'a> Error for NmeaError<'a>
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
impl<'a> StructuralPartialEq for NmeaError<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for NmeaError<'a>
impl<'a> Send for NmeaError<'a>
impl<'a> Sync for NmeaError<'a>
impl<'a> Unpin for NmeaError<'a>
impl<'a> UnwindSafe for NmeaError<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more