#[non_exhaustive]pub enum ParseErrorKind {
Empty,
GridZoneOnly,
BadZoneNumber,
BadBandLetter,
BadSquareLetters,
SquareZoneMismatch,
SquareBandMismatch,
OddDigitCount,
TooManyDigits,
NonAsciiOrWhitespace,
TrailingInput,
}Expand description
The first parse rule an invalid MGRS string broke.
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.
Empty
The string is empty after trimming ASCII whitespace.
GridZoneOnly
A zone-only reference such as “18T”. Deliberately unsupported: a cell six degrees wide has no useful center.
BadZoneNumber
The leading digits are not a zone number in 1 to 60.
BadBandLetter
The letter after the zone is not a band letter C to X (I and O excluded).
BadSquareLetters
A 100 km square letter is not in the MGRS alphabets.
SquareZoneMismatch
Square letters valid in the alphabet but not for this zone.
SquareBandMismatch
The implied northing is inconsistent with the band letter.
OddDigitCount
The digit block has an odd number of digits.
TooManyDigits
The digit block has more than 22 digits.
NonAsciiOrWhitespace
The string contains a non-ASCII byte or internal whitespace.
TrailingInput
A character that is neither a letter nor a digit where digits were expected.
Trait Implementations§
Source§impl Clone for ParseErrorKind
impl Clone for ParseErrorKind
impl Copy for ParseErrorKind
Source§impl Debug for ParseErrorKind
impl Debug for ParseErrorKind
Source§impl Display for ParseErrorKind
impl Display for ParseErrorKind
impl Eq for ParseErrorKind
Source§impl PartialEq for ParseErrorKind
impl PartialEq for ParseErrorKind
impl StructuralPartialEq for ParseErrorKind
Auto Trait Implementations§
impl Freeze for ParseErrorKind
impl RefUnwindSafe for ParseErrorKind
impl Send for ParseErrorKind
impl Sync for ParseErrorKind
impl Unpin for ParseErrorKind
impl UnsafeUnpin for ParseErrorKind
impl UnwindSafe for ParseErrorKind
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