Enum ErrorKind

Source
pub enum ErrorKind {
Show 26 variants InvalidFileHeader, InvalidFileHeaderTotalLength, InvalidFileHeaderChecksumA, InvalidFileHeaderChecksumB, InvalidFileHeaderDataVersion, InvalidFileHeaderSpecificationOffset, InvalidSpecificationTextTable, InvalidSpecificationLocalizedTextTable, InvalidSpecificationUnitTable, InvalidSpecificationDeviceTemplateTable, InvalidSpecificationPacketTemplateTable, InvalidTextStringOffset, InvalidTextContent, InvalidLocalizedTextTextIndexEn, InvalidLocalizedTextTextIndexDe, InvalidLocalizedTextTextIndexFr, InvalidUnitUnitFamilyId, InvalidUnitUnitCodeTextIndex, InvalidUnitUnitTextTextIndex, InvalidDeviceTemplateNameLocalizedTextIndex, InvalidPacketTemplateFieldTable, InvalidPacketTemplateFieldIdTextIndex, InvalidPacketTemplateFieldNameLocalizedTextIndex, InvalidPacketTemplateFieldUnitId, InvalidPacketTemplateFieldTypeId, InvalidPacketTemplateFieldPartTable,
}
Expand description

A list of errors that can occur if the VSF1 data cannot be parsed.

Variants§

§

InvalidFileHeader

The data is too small for a valid FILEHEADER.

§

InvalidFileHeaderTotalLength

The data length does not match the “TotalLength” field of the FILEHEADER.

§

InvalidFileHeaderChecksumA

The data does not match the “ChecksumA” field of the FILEHEADER.

§

InvalidFileHeaderChecksumB

The data does not match the “ChecksumB” field of the FILEHEADER.

§

InvalidFileHeaderDataVersion

The “DataVersion” field of the FILEHEADER is not supported.

§

InvalidFileHeaderSpecificationOffset

The “SpecificationOffset” of the FILEHEADER is out-of-bounds.

§

InvalidSpecificationTextTable

The “Text{Count,TableOffset}” fields of the SPECIFICATION block are out-of-bounds.

§

InvalidSpecificationLocalizedTextTable

The “LocalizedText{Count,TableOffset}” fields of the SPECIFICATION block are out-of-bounds.

§

InvalidSpecificationUnitTable

The “Unit{Count,TableOffset}” fields of the SPECIFICATION block are out-of-bounds.

§

InvalidSpecificationDeviceTemplateTable

The “DeviceTemplate{Count,TableOffset}” fields of the SPECIFICATION block are out-of-bounds.

§

InvalidSpecificationPacketTemplateTable

The “PacketTemplate{Count,TableOffset}” fields of the SPECIFICATION block are out-of-bounds.

§

InvalidTextStringOffset

The “StringOffset” field of a TEXT block is out-of-bounds.

§

InvalidTextContent

The contents of a TEXT is out-of-bounds.

§

InvalidLocalizedTextTextIndexEn

The “TextIndexEN” field of a LOCALIZEDTEXT block is out-of-bounds.

§

InvalidLocalizedTextTextIndexDe

The “TextIndexDE” field of a LOCALIZEDTEXT block is out-of-bounds.

§

InvalidLocalizedTextTextIndexFr

The “TextIndexFR” field of a LOCALIZEDTEXT block is out-of-bounds.

§

InvalidUnitUnitFamilyId

The “UnitFamilyId” field of a UNIT block is out-of-bounds.

§

InvalidUnitUnitCodeTextIndex

The “UnitCodeTextIndex” field of a UNIT block is out-of-bounds.

§

InvalidUnitUnitTextTextIndex

The “UnitTextTextIndex” field of a UNIT block is out-of-bounds.

§

InvalidDeviceTemplateNameLocalizedTextIndex

The “NameLocalizedTextIndex” field of a DEVICETEMPLATE block is out-of-bounds.

§

InvalidPacketTemplateFieldTable

The “Field{Count,TableOffset}” fields of a PACKETTEMPLATE block are out-of-bounds.

§

InvalidPacketTemplateFieldIdTextIndex

The “IdTextIndex” of a PACKETTEMPLATEFIELD block is out-of-bounds.

§

InvalidPacketTemplateFieldNameLocalizedTextIndex

The “NameLocalizedTextIndex” of a PACKETTEMPLATEFIELD block is out-of-bounds.

§

InvalidPacketTemplateFieldUnitId

The “UnitId” of a PACKETTEMPLATEFIELD block is out-of-bounds.

§

InvalidPacketTemplateFieldTypeId

The “TypeId” of a PACKETTEMPLATEFIELD block is out-of-bounds.

§

InvalidPacketTemplateFieldPartTable

The “Part{Count,TableOffset}” of a PACKETTEMPLATEFIELD is out-of-bounds.

Trait Implementations§

Source§

impl Clone for ErrorKind

Source§

fn clone(&self) -> ErrorKind

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ErrorKind

Source§

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

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

impl Copy for ErrorKind

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.