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

Fields

calculated: u8
found: u8

The checksum of the sentence was corrupt or wrong

WrongSentenceHeader

Fields

expected: &'a [u8]
found: &'a [u8]

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

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.