#[non_exhaustive]pub enum Error {
Show 17 variants
MalformedAttributes(String),
DecompressingError(Error),
Base64DecodingError(DecodeError),
CsvDecodingError(CsvDecodingError),
XmlDecodingError(Error),
RangeError(String),
PrematureEnd(String),
PathIsNotFile,
ResourceLoadingError {
path: PathBuf,
err: Box<dyn Error + Send + Sync + 'static>,
},
InvalidTileFound,
InvalidEncodingFormat {
encoding: Option<String>,
compression: Option<String>,
},
InvalidPropertyValue {
description: String,
},
UnknownPropertyType {
type_name: String,
},
TemplateHasNoObject,
InvalidWangIdEncoding {
read_string: String,
},
InvalidObjectData {
description: String,
},
InvalidTileset(InvalidTilesetError),
}Expand description
Errors which occurred when parsing the file
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MalformedAttributes(String)
A attribute was missing, had the wrong type of wasn’t formated correctly.
DecompressingError(Error)
An error occurred when decompressing using the flate2 crate.
Base64DecodingError(DecodeError)
An error occurred when decoding a base64 encoded dataset.
CsvDecodingError(CsvDecodingError)
An error occurred when decoding a csv encoded dataset.
XmlDecodingError(Error)
An error occurred when parsing an XML file, such as a TMX or TSX file.
RangeError(String)
A parameter is out of range or results in arithmetic underflow or overflow.
PrematureEnd(String)
The XML stream ended before the document was fully parsed.
PathIsNotFile
The path given is invalid because it isn’t contained in any folder.
ResourceLoadingError
An error generated by ResourceReader while trying to read a
resource.
Fields
InvalidTileFound
There was an invalid tile in the map parsed.
InvalidEncodingFormat
Unknown encoding or compression format or invalid combination of both (for tile layers)
Fields
InvalidPropertyValue
There was an error parsing the value of a PropertyValue.
UnknownPropertyType
Found an unknown property value type while parsing a PropertyValue.
Fields
TemplateHasNoObject
A template was found that does not have an object element in it.
InvalidWangIdEncoding
Found a WangId that was not properly formatted.
InvalidObjectData
There was an error parsing an Object’s data.
InvalidTileset(InvalidTilesetError)
There was an invalid tileset in the map parsed.