#[non_exhaustive]pub enum ArxmlParserError {
Show 27 variants
InvalidArxmlFileHeader,
UnexpectedXmlFileHeader {
element: ElementName,
},
UnknownAutosarVersion {
input_verstring: String,
},
InvalidAutosarVersion {
input_verstring: String,
replacement: AutosarVersion,
},
IncorrectBeginElement {
element: ElementName,
sub_element: ElementName,
},
InvalidBeginElement {
element: ElementName,
invalid_element: String,
},
IncorrectEndElement {
element: ElementName,
other_element: ElementName,
},
InvalidEndElement {
parent_element: ElementName,
invalid_element: String,
},
ElementChoiceConflict {
element: ElementName,
sub_element: ElementName,
},
ElementVersionError {
element: ElementName,
sub_element: ElementName,
version: AutosarVersion,
},
TooManySubElements {
element: ElementName,
sub_element: ElementName,
},
RequiredSubelementMissing {
element: ElementName,
sub_element: ElementName,
},
AttributeValueError {
element: ElementName,
attribute_text: String,
},
UnknownAttributeError {
element: ElementName,
attribute: String,
},
AttributeVersionError {
element: ElementName,
attribute: AttributeName,
version: AutosarVersion,
},
RequiredAttributeMissing {
element: ElementName,
attribute: AttributeName,
},
CharacterContentForbidden {
element: ElementName,
},
EnumItemVersionError {
element: ElementName,
enum_item: EnumItem,
version: AutosarVersion,
},
UnknownEnumItem {
value: String,
},
InvalidEnumItem {
element: ElementName,
item: EnumItem,
},
StringValueTooLong {
value: String,
length: usize,
},
RegexMatchError {
value: String,
regex: String,
},
Utf8Error {
source: Utf8Error,
},
UnexpectedEndOfFile {
element: ElementName,
},
InvalidNumber {
input: String,
},
AdditionalDataError,
InvalidXmlEntity {
input: String,
},
}Expand description
ArxmlParserError contains all the errors that can occur while parsing a file
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidArxmlFileHeader
The arxml file header is invalid
UnexpectedXmlFileHeader
An XML file header was unexpectedly found inside the ARXML data
Fields
element: ElementNameThe element that was open when the unexpected XML file header was found
UnknownAutosarVersion
The file version in the xsi:schemaLocation attribute is unknown
InvalidAutosarVersion
The file version in the xsi:schemaLocation attribute is invalid, but can be corrected
Fields
replacement: AutosarVersionThe corrected version
IncorrectBeginElement
A valid name of an Autosar element was found, but it is not allowed in the current context
Fields
element: ElementNameThe parent element where the error occurred
sub_element: ElementNameThe unexpected child element
InvalidBeginElement
An xml element was found, but it is not a valid Autosar element
Fields
element: ElementNameThe parent element where the error occurred
IncorrectEndElement
An element was opened, but the closing tag for a different element was found
Fields
element: ElementNameThe element that was open when the incorrect closing tag was found
other_element: ElementNameThe name of the element that was closed
InvalidEndElement
An xml element was closed, but it is not a valid Autosar element
Fields
parent_element: ElementNameThe parent element where the error occurred
ElementChoiceConflict
A parent element contains multiple sub elements which are mutually exclusive
Fields
element: ElementNameThe parent element where the error occurred
sub_element: ElementNameThe name of the conflicting sub element
ElementVersionError
The element contains a sub element that is not allowed in the current Autosar version
Fields
element: ElementNameThe parent element where the error occurred
sub_element: ElementNameThe sub element that is not allowed
version: AutosarVersionThe Autosar version in which the sub element is not allowed
TooManySubElements
A sub element is only allowed to be present once inside a parent element, but another occurrence was found
Fields
element: ElementNameThe parent element where the error occurred
sub_element: ElementNameThe name of the sub element that was found multiple times
RequiredSubelementMissing
A required sub element is missing from a parent element
Fields
element: ElementNameThe parent element where the error occurred
sub_element: ElementNameThe name of the missing sub element
AttributeValueError
An attribute value yould not be parsed
Fields
element: ElementNameThe element where the error occurred
UnknownAttributeError
An unknown attribute was found in an element
Fields
element: ElementNameThe element where the error occurred
AttributeVersionError
A known attribute was found, but it is not allowed in the current Autosar version
Fields
element: ElementNameThe element where the error occurred
attribute: AttributeNameThe name of the attribute that is not allowed
version: AutosarVersionThe Autosar version in which the attribute is not allowed
RequiredAttributeMissing
An attribute is required in an element, but it was not found
Fields
element: ElementNameThe element where the error occurred
attribute: AttributeNameThe name of the missing attribute
CharacterContentForbidden
Character content was found inside an element that does not allow it
Fields
element: ElementNameThe element where the error occurred
EnumItemVersionError
A valid enum item was found, but it is not allowed in the current autosar version
Fields
element: ElementNameThe element where the error occurred
version: AutosarVersionThe Autosar version in which the enum item is not allowed
UnknownEnumItem
A string could not be parsed as a valid enum item
InvalidEnumItem
Parsed a valid enum item, but it is not part of the enum in the current context
Fields
element: ElementNameThe element where the error occurred
StringValueTooLong
The string value is too long
RegexMatchError
The string value does not match the validation regex
Fields
Utf8Error
Some bytes from the input could not be converted to a utf-8 string
UnexpectedEndOfFile
The end of the input was reached unexpectedly while parsing an element
Fields
element: ElementNameThe element that was open when the end of the file was reached
InvalidNumber
A number was expected, but the input could not be parsed as a number
AdditionalDataError
The input contains additional data after the final </AUTOSAR> element
InvalidXmlEntity
The input contains an invalid XML entity