Skip to main content

Error

Enum Error 

Source
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: OmapSection

The section that was encountered.

§required_before: OmapSection

The 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 Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error

Source§

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

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AttrError> for Error

Source§

fn from(source: AttrError) -> Self

Converts to this type from the input type.
Source§

impl From<BorrowError> for Error

Source§

fn from(source: BorrowError) -> Self

Converts to this type from the input type.
Source§

impl From<BorrowMutError> for Error

Source§

fn from(source: BorrowMutError) -> Self

Converts to this type from the input type.
Source§

impl From<EncodingError> for Error

Source§

fn from(source: EncodingError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<EscapeError> for Error

Source§

fn from(source: EscapeError) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for Error

Source§

fn from(source: FromUtf8Error) -> Self

Converts to this type from the input type.
Source§

impl From<Infallible> for Error

Source§

fn from(source: Infallible) -> Self

Converts to this type from the input type.
Source§

impl From<IntoInnerError<BufWriter<Vec<u8>>>> for Error

Source§

fn from(source: IntoInnerError<BufWriter<Vec<u8>>>) -> Self

Converts to this type from the input type.
Source§

impl From<ParseError> for Error

Source§

fn from(source: ParseError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseFloatError> for Error

Source§

fn from(source: ParseFloatError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseIntError> for Error

Source§

fn from(source: ParseIntError) -> Self

Converts to this type from the input type.
Source§

impl From<TryFromIntError> for Error

Source§

fn from(source: TryFromIntError) -> Self

Converts to this type from the input type.
Source§

impl From<Utf8Error> for Error

Source§

fn from(source: Utf8Error) -> Self

Converts to this type from the input type.

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.