#[non_exhaustive]pub enum AutosarDataError {
Show 31 variants
IoErrorRead {
filename: PathBuf,
ioerror: Error,
},
IoErrorOpen {
filename: PathBuf,
ioerror: Error,
},
IoErrorWrite {
filename: PathBuf,
ioerror: Error,
},
DuplicateFilenameError {
verb: &'static str,
filename: PathBuf,
},
LexerError {
filename: PathBuf,
line: usize,
source: ArxmlLexerError,
},
ParserError {
filename: PathBuf,
line: usize,
source: ArxmlParserError,
},
OverlappingDataError {
filename: PathBuf,
path: String,
},
ItemDeleted,
InvalidPosition,
VersionMismatch {
version_cur: AutosarVersion,
version_new: AutosarVersion,
},
VersionIncompatibleData {
version: AutosarVersion,
},
ElementNotIdentifiable {
xmlpath: String,
},
ItemNameRequired {
element: ElementName,
},
IncorrectContentType {
element: ElementName,
},
ElementInsertionConflict {
parent: ElementName,
element: ElementName,
parent_path: String,
},
InvalidSubElement {
parent: ElementName,
element: ElementName,
},
ElementNotFound {
target: ElementName,
parent: ElementName,
},
ShortNameRemovalForbidden,
NotReferenceElement,
InvalidReference,
DuplicateItemName {
element: ElementName,
item_name: String,
},
ForbiddenMoveToSubElement,
ForbiddenCopyOfParent,
ParentElementLocked,
InvalidAttribute,
InvalidAttributeValue,
InvalidFile,
EmptyFile,
InvalidFileMerge {
path: String,
},
NoFilesInModel,
FilesetModificationForbidden,
}Expand description
The error type AutosarDataError wraps all errors that can be generated anywhere in the crate
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IoErrorRead
IoErrorRead: An IoError that occurred while reading a file
Fields
IoErrorOpen
IoErrorOpen: an IoError that occurres while opening a file
Fields
IoErrorWrite
IoErrorWrite: An IoError that occurred while writing a file
Fields
DuplicateFilenameError
DuplicateFilenameError: The model can’#’t contain two files with identical names
Fields
LexerError
LexerError: An error originating in the lexer, such as unclodes strings, mismatched ‘<’ and ‘>’, etc
Fields
source: ArxmlLexerErrorThe underlying ArxmlLexerError
ParserError
ParserError: A parser error
Fields
source: ArxmlParserErrorThe underlying ArxmlParserError
OverlappingDataError
A file could not be loaded into the model, because the Autosar paths of the new data overlapped with the Autosar paths of the existing data
Fields
ItemDeleted
An operation failed because one of the elements involved is in the deleted state and will be freed once its reference count reaches zero
InvalidPosition
A sub element could not be created at or moved to the given position
VersionMismatch
The Autosar version of the new file or element did not match the version already in use
Fields
version_cur: AutosarVersionThe current version of the model
version_new: AutosarVersionThe version of the new file or element
VersionIncompatibleData
The Autosar version is not compatible with the data
Fields
version: AutosarVersionThe incompatible version
ElementNotIdentifiable
A function that only applies to identifiable elements was called on an element which is not identifiable
Fields
ItemNameRequired
An item name is required to perform this action
Fields
element: ElementNameThe element where the item name is required
IncorrectContentType
The element has the wrong content type for the requested operation, e.g. inserting elements when the content type only allows character data
Fields
element: ElementNameThe element where the content type is incorrect
ElementInsertionConflict
Could not insert a sub element, because it conflicts with an existing sub element
Fields
parent: ElementNameThe name of the parent element
element: ElementNameThe name of the element that could not be inserted
InvalidSubElement
The ElementName is not a valid sub element according to the specification.
Fields
parent: ElementNameThe name of the parent element
element: ElementNameThe name of the element that is not a valid sub element
ElementNotFound
Remove operation failed: the given element is not a sub element of the element from which it was supposed to be removed
Fields
target: ElementNameThe name of the element that was not found
parent: ElementNameThe name of the parent element
ShortNameRemovalForbidden
Element::remove_sub_element cannot remove the SHORT-NAME of identifiable elements, as this would render the data invalid
NotReferenceElement
get/set reference target was called for an element that is not a reference
InvalidReference
The reference is invalid
DuplicateItemName
An element could not be renamed, since this item name is already used by a different element
Fields
element: ElementNameThe name of the element that could not be renamed
ForbiddenMoveToSubElement
Cannot move an element into its own sub element
ForbiddenCopyOfParent
Cannot copy an element (or a hierarchy including the element) into itself
ParentElementLocked
A parent element is currently locked by a different operation. The operation wa aborted to avoid a deadlock.
InvalidAttribute
The attribute is invalid here
InvalidAttributeValue
The attribute value is invalid
InvalidFile
The file is from a different model and may not be used in this operation
EmptyFile
The file is empty and cannot be serialized
InvalidFileMerge
The newly loaded file diverges from the combined model on an element which is not splittable according to the metamodel
NoFilesInModel
The operation cannot be completed because the model does not contain any files
FilesetModificationForbidden
Modifying the fileset of this element is not allowed