pub enum AutosarDataError {
Show 22 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, VersionIncompatible, ElementNotIdentifiable, ItemNameRequired, IncorrectContentType, ElementInsertionConflict, InvalidSubElement, ElementNotFound, ShortNameRemovalForbidden, NotReferenceElement, InvalidReference, DuplicateItemName, ForbiddenMoveToSubElement, ParentElementLocked,
}
Expand description

The error type AutosarDataError wraps all errors that can be generated anywhere in the crate

Variants

IoErrorRead

Fields

filename: PathBuf
ioerror: Error

IoErrorRead: An IoError that occurred while reading a file

IoErrorOpen

Fields

filename: PathBuf
ioerror: Error

IoErrorOpen: an IoError that occurres while opening a file

IoErrorWrite

Fields

filename: PathBuf
ioerror: Error

IoErrorWrite: An IoError that occurred while writing a file

DuplicateFilenameError

Fields

verb: &'static str
filename: PathBuf

DuplicateFilenameError,

LexerError

Fields

filename: PathBuf
line: usize
source: ArxmlLexerError

LexerError: An error originating in the lexer, such as unclodes strings, mismatched ‘<’ and ‘>’, etc

ParserError

Fields

filename: PathBuf
line: usize
source: ArxmlParserError

ParserError: A parser error

OverlappingDataError

Fields

filename: PathBuf
path: String

A file could not be loaded into the project, because the Autosar paths of the new data overlapped with the Autosar paths of the existing data

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

VersionIncompatible

The Autosar version of the containing file was not compatible

ElementNotIdentifiable

A function that only applies to identifiable elements was called on an element which is not identifiable

ItemNameRequired

An item name is required to perform this action

IncorrectContentType

The element has the wrong content type for the requested operation, e.g. inserting elements when the content type only allows character data

ElementInsertionConflict

Could not insert a sub element, because it conflicts with an existing sub element

InvalidSubElement

The ElementName is not a valid sub element according to the specification.

ElementNotFound

Remove operation failed: the given element is not a sub element of the element from which it was supposed to be removed

ShortNameRemovalForbidden

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

ForbiddenMoveToSubElement

Cannot move an element into its own sub element

ParentElementLocked

A parent element is currently locked by a different operation. The operation wa aborted to avoid a deadlock.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

👎Deprecated since 1.42.0:

use the Display impl or to_string()

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

🔬This is a nightly-only experimental API. (error_generic_member_access)

Provides type based access to context intended for error reports. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

🔬This is a nightly-only experimental API. (provide_any)

Data providers should implement this method to provide all values they are able to provide by using demand. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.