#[non_exhaustive]pub enum ParserError {
Decode(DecodeError),
UnsupportedVersion {
layer_name: String,
version: u32,
},
InvalidTags,
InvalidGeometry,
CoordinateOverflow {
value: i32,
},
}Expand description
An error that can occur during parsing of a vector tile.
§Examples
use mvt_reader::error::ParserError;
fn example() -> Result<(), ParserError> {
Err(ParserError::InvalidTags)
}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.
Decode(DecodeError)
A protobuf decoding failure.
UnsupportedVersion
The layer has an unsupported vector tile version.
InvalidTags
The tags section of a feature is malformed.
InvalidGeometry
The geometry section of a feature is malformed.
CoordinateOverflow
A coordinate value does not fit in the requested numeric type.
Trait Implementations§
Source§impl Debug for ParserError
impl Debug for ParserError
Source§impl Display for ParserError
impl Display for ParserError
Source§impl Error for ParserError
impl Error for ParserError
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<DecodeError> for ParserError
impl From<DecodeError> for ParserError
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParserError
impl RefUnwindSafe for ParserError
impl Send for ParserError
impl Sync for ParserError
impl Unpin for ParserError
impl UnsafeUnpin for ParserError
impl UnwindSafe for ParserError
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