pub enum Error {
Show 73 variants
FromStrError,
XmlError(Error),
IoError(Error),
IntoInnerError(IntoInnerError<BufWriter<Vec<u8>>>),
UnsupportedOmapNamespace,
MissingOmapVersion,
UnsupportedOmapVersion(u8),
UnsupportedXmlVersion,
MissingCoordinateComponent(CoordinateComponent),
AttrError(AttrError),
StrUtf8Error(Utf8Error),
StringUtf8Error(FromUtf8Error),
EncodingError(EncodingError),
EscapeError(EscapeError),
MapPartMergeError,
MissingXmlEncoding,
UnsupportedXmlEncoding,
ParseIntError(ParseIntError),
ParseFloatError(ParseFloatError),
UnexpectedEof(OmapSection),
MissingRequiredSection(OmapSection),
SectionOutOfOrder {
section: OmapSection,
required_before: OmapSection,
},
MissingMapScale,
InvalidGeoreferencing,
MissingObjectType,
UnknownObjectSymbolId(i32),
MissingObjectGeometry(ObjectKind),
MissingTextObjectCoordinates,
MissingSymbolId,
UnknownSymbolType(u8),
UnknownElementSymbolType(u8),
UnknownElementObjectType(u8),
ElementSymbolObjectMismatch,
ElementObjectBeforeSymbol,
MissingElementData,
MissingPointSymbolElementPart,
SymbolIdOutOfRange(usize),
DuplicateSymbolId(usize),
SymbolCountMismatch,
ComponentsInNonCombinedSymbol,
UnknownFillPatternType(u8),
MissingPointPatternSymbol,
UnknownPrivatePartSymbolType(u8),
EmptyPrivatePart,
MissingColorId,
BorrowError(BorrowError),
BorrowMutError(BorrowMutError),
BezierConversionError(Error),
ColorError,
CyclicSymbolDefinition,
SymbolCycleBorrow,
SymbolSetIndexOutOfRange(usize),
CombinedSymbolContainsPointOrText,
CombinedLineSymbolContainsNonLine,
UnknownClippingOption,
UnknownCapStyle,
UnknownJoinStyle,
UnknownMidSymbolPlacement,
TemplateError,
TryFromIntError(TryFromIntError),
ViewError,
ObjectError,
NotInUnitInterval,
NotNonNegativeF64,
Infallible(Infallible),
MapCoordOutOfBounds,
EmptyCode,
WmmError(Error),
ProjError(Error),
ProjParseError(ParseError),
ProjScaleToleranceError,
CannotGetAffineTransformBetweenDifferentProjections,
SymbolConversionError,
}Expand description
Errors that can occur when reading, writing, or manipulating OMAP data.
Variants§
FromStrError
An error when converting from str.
XmlError(Error)
An error from the XML parser.
IoError(Error)
An I/O error.
IntoInnerError(IntoInnerError<BufWriter<Vec<u8>>>)
An error flushing an internal BufWriter.
UnsupportedOmapNamespace
The root map element has an unsupported XML namespace.
MissingOmapVersion
The root map element is missing its version.
UnsupportedOmapVersion(u8)
The root map element has an unsupported version.
UnsupportedXmlVersion
The XML declaration has an unsupported XML version.
MissingCoordinateComponent(CoordinateComponent)
A coordinate component is missing.
AttrError(AttrError)
An XML attribute error.
StrUtf8Error(Utf8Error)
A &str UTF-8 conversion error.
StringUtf8Error(FromUtf8Error)
A String UTF-8 conversion error.
EncodingError(EncodingError)
An XML encoding error.
EscapeError(EscapeError)
An XML escape-sequence error.
MapPartMergeError
Map parts could not be merged (indices out of range or identical).
MissingXmlEncoding
The XML declaration is missing an encoding.
UnsupportedXmlEncoding
The XML encoding is not supported by this crate.
ParseIntError(ParseIntError)
Failed to parse an integer.
ParseFloatError(ParseFloatError)
Failed to parse a float.
UnexpectedEof(OmapSection)
The parser reached EOF before a section ended.
MissingRequiredSection(OmapSection)
A required top-level section was not found.
SectionOutOfOrder
A section appeared before another required section.
Fields
section: OmapSectionThe section that was encountered.
required_before: OmapSectionThe section that must be parsed first.
MissingMapScale
The georeferencing section is missing the map scale.
InvalidGeoreferencing
The georeferencing section could not be parsed.
MissingObjectType
A map object is missing its type.
UnknownObjectSymbolId(i32)
A map object references an unknown symbol id.
MissingObjectGeometry(ObjectKind)
A parsed object is missing its geometry.
MissingTextObjectCoordinates
A text object is missing coordinate data.
MissingSymbolId
A symbol is missing its id.
UnknownSymbolType(u8)
A symbol has an unknown type value.
UnknownElementSymbolType(u8)
A point-symbol element has an unknown symbol type value.
UnknownElementObjectType(u8)
A point-symbol element has an unknown object type value.
ElementSymbolObjectMismatch
A point-symbol element has mismatched symbol and object data.
ElementObjectBeforeSymbol
A point-symbol element object appeared before its symbol.
MissingElementData
A point-symbol element is missing symbol or object data.
MissingPointSymbolElementPart
A point-symbol element is missing a required point symbol.
SymbolIdOutOfRange(usize)
A symbol id is outside the declared symbol count.
DuplicateSymbolId(usize)
A symbol id appears more than once.
SymbolCountMismatch
The declared symbol count does not match the parsed symbols.
ComponentsInNonCombinedSymbol
A non-combined symbol declares combined-symbol components.
UnknownFillPatternType(u8)
A fill pattern has an unknown type value.
MissingPointPatternSymbol
A point fill pattern is missing its point symbol.
UnknownPrivatePartSymbolType(u8)
A private combined-symbol part has an unknown symbol type.
EmptyPrivatePart
A private combined-symbol part is empty.
MissingColorId
A color definition is missing its id.
BorrowError(BorrowError)
A RefCell borrow failed.
BorrowMutError(BorrowMutError)
A RefCell mutable borrow failed.
BezierConversionError(Error)
A Bézier-curve conversion error.
ColorError
An invalid color definition.
CyclicSymbolDefinition
A symbol definition would create a cycle.
SymbolCycleBorrow
A symbol could not be borrowed while checking for cycles.
SymbolSetIndexOutOfRange(usize)
A combined symbol references a symbol outside the symbol set.
CombinedSymbolContainsPointOrText
A combined area symbol references a point or text symbol.
CombinedLineSymbolContainsNonLine
A combined line symbol references a non-line symbol.
UnknownClippingOption
A clipping option value is unknown.
UnknownCapStyle
A line cap style value is unknown.
UnknownJoinStyle
A line join style value is unknown.
UnknownMidSymbolPlacement
A mid-symbol placement value is unknown.
TemplateError
A template-related error.
TryFromIntError(TryFromIntError)
Could not convert signed integer to unsigned integer
ViewError
A view-related error.
ObjectError
An object-related error.
NotInUnitInterval
The value is not in the unit interval [0, 1].
NotNonNegativeF64
The value is negative.
Infallible(Infallible)
Infallible conversion (required by From blanket impl).
MapCoordOutOfBounds
A map coordinate exceeds the file-format range.
EmptyCode
An Error when parsing a Code from an empty string
WmmError(Error)
An error from the World Magnetic Model.
ProjError(Error)
A proj4 projection error.
ProjParseError(ParseError)
Could not parse the crs definition to a CrsDef object
ProjScaleToleranceError
A tolerance error when calculating the scale factor during geo referencing
CannotGetAffineTransformBetweenDifferentProjections
Affine transforms are only available between changed geo referencing within the same projection
SymbolConversionError
Tried to call try into on non-compatible symbols
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BorrowError> for Error
impl From<BorrowError> for Error
Source§fn from(source: BorrowError) -> Self
fn from(source: BorrowError) -> Self
Source§impl From<BorrowMutError> for Error
impl From<BorrowMutError> for Error
Source§fn from(source: BorrowMutError) -> Self
fn from(source: BorrowMutError) -> Self
Source§impl From<EncodingError> for Error
impl From<EncodingError> for Error
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Source§impl From<EscapeError> for Error
impl From<EscapeError> for Error
Source§fn from(source: EscapeError) -> Self
fn from(source: EscapeError) -> Self
Source§impl From<FromUtf8Error> for Error
impl From<FromUtf8Error> for Error
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Source§impl From<Infallible> for Error
impl From<Infallible> for Error
Source§fn from(source: Infallible) -> Self
fn from(source: Infallible) -> Self
Source§impl From<ParseError> for Error
impl From<ParseError> for Error
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Source§impl From<ParseFloatError> for Error
impl From<ParseFloatError> for Error
Source§fn from(source: ParseFloatError) -> Self
fn from(source: ParseFloatError) -> Self
Source§impl From<ParseIntError> for Error
impl From<ParseIntError> for Error
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Source§impl From<TryFromIntError> for Error
impl From<TryFromIntError> for Error
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more