pub enum RLibError {
Show 148 variants
DataCannotBeCompressed,
DataCannotBeDecompressed,
ManifestFileNotFound,
ManifestFileParseError(String),
DecodingNotMoreBytesToDecode,
DecodingBoolError(u8),
DecodingNoBytesLeftError,
DecodingNotEnoughBytesToDecodeForType(String, usize, Option<usize>),
DecodeIntError(ParseIntError),
DecodeFloatError(ParseFloatError),
DecodeUTF8Error(FromUtf8Error),
DecodeUTF8StrError(Utf8Error),
DecodeUTF16Error(FromUtf16Error),
DecodeUTF16UnevenInputError(usize),
DecodeUTF8FromISO8859Error(String),
DecodingStringSizeError(String),
DecodingOptionalStringBoolError(String),
DecodingString0TeminatedNo0Error,
EncodingPaddedStringError(String, String, usize, usize),
GameInstallTypeNotSupported(String, String),
GameInstallLaunchNotSupported(String, String),
ParseBoolError(String),
ReadFileFolderError(String),
PackHeaderNotComplete,
PackSubHeaderMissing,
PackIndexesNotComplete,
UnknownPFHFileType(String),
UnknownPFHVersion(String),
UnknownESFSignature(String),
UnknownESFSignatureBytes(u8, u8),
UnknownEFLineType(String),
UnknownPipeType(String),
GameDoesntSupportCs2Migration,
DecodingTextUnsupportedEncodingOrNotATextFile,
DecodingAnimsTableUnknownVersion(i32),
DecodingCAVP8UnsupportedFormat,
DecodingCAVP8IncorrectOrUnknownFrameSize,
DecodingESFUnsupportedSignature(u8, u8),
DecodingESFUnsupportedDataType(u8),
DecodingESFRecordNameNotFound(u16),
DecodingESFStringNotFound(u32),
EncodingESFUnsupportedSignature(String),
DecodingFontUnsupportedSignature(Vec<u8>),
DecodingFastBinUnsupportedSignature(Vec<u8>),
DecodingFastBinUnsupportedVersion(String, u16),
EncodingFastBinUnsupportedVersion(String, u16),
DecodingRigidModelUnsupportedSignature(Vec<u8>),
DecodingRigidModelUnsupportedVersion(u32),
DecodingRigidModelUnsupportedMaterialType(u16),
DecodingRigidModelUnknownTextureType(i32),
DecodingRigidModelUnknownVertexFormat(u16),
DecodingRigidModelUnsupportedVertexFormatForMaterial(u16, u16),
DecodingGroupFormationsUnknownEnumValue(String, u32),
DecodingTableCombinedColour,
SoundBankBKHDNotFound,
SoundBankUnsupportedSectionFound(String),
SoundBankUnsupportedVersionFound(u32, String),
SoundBankUnsupportedLanguageFound(u32),
SoundBankUnsupportedObjectTypeFound(u8),
DecodingTableFieldError(u32, u32, String),
DecodingTableFieldSequenceIndexError(u32, u32, usize, String),
DecodingTableFieldSequenceDataError(u32, u32, String, String),
DecodingTableIncomplete(String, Box<TableInMemory>),
DecodingMissingExtraData,
DecodingMissingExtraDataField(String),
DecodingUnsupportedGameSelected(String),
TableRowWrongFieldCount(usize, usize),
EncodingTableWrongFieldType(String, String),
DecodingDBNoDefinitionsFoundAndEmptyFile,
DecodingDBNoDefinitionsFound,
DecodingDBNotADBTable,
DecodingLocNotALocTable,
DecodingMatchedCombatNotAMatchedCombatTable,
DecodingUnitVariantNotAUnitVariant,
DecodingMismatchSizeError(usize, usize),
DecodingPortraitSettingUnsupportedVersion(usize),
DecodingUnsupportedVersion(usize),
DecodingAnimFragmentUnsupportedVersion(usize),
DecodingMatchedCombatUnsupportedVersion(usize),
DecodedDataDoesNotMatchFileType(FileType, FileType),
DecodingSoundPackedUnsupportedGame(String),
EncodingSoundPackedUnsupportedGame(String),
EncodingMissingExtraData,
InvalidStateParticipantValue(u32),
GitErrorDownloadFromRepo(String),
GitErrorNoUpdatesAvailable(String),
FileSourceChanged(String),
DataTooBigForContainer(String, u64, usize, String),
FileNotFound(String),
FileNotDecoded(String),
FileNotCached(String),
ReservedFiles,
EmptyDestiny,
NoPacksProvided,
LiveExportNoFilesToExport,
BuildStartposError(String),
UpdateAnimIdsError(String),
MissingSQLitePool,
PathMissingFileName(String),
DependenciesCacheNotGeneratedorOutOfDate,
DependenciesCacheFileNotFound(String),
NoDefinitionUpdateAvailable,
NoTableInGameFilesToCompare,
AssemblyKitUnsupportedVersion(i16),
AssemblyKitNotFound,
AssemblyKitTableNotFound(String),
AssemblyKitTableTableIgnored,
AssemblyKitLocalisableFieldsNotFound,
AssemblyKitExtraRelationshipsNotFound,
RawTableMissingDefinition,
ImportTSVIncorrectRow(usize, usize),
ImportTSVWrongTypeTable,
ImportTSVInvalidVersion,
ImportTSVInvalidOrMissingPath,
RFileMergeOnlyOneFileProvided,
RFileMergeDifferentTypes,
RFileMergeTablesDifferentNames,
RFileMergeTablesNotEnoughTablesProvided,
RFileMergeNotSupportedForType(String),
GroupFormationUnknownBlockType(u32),
PatchSiegeAIEmptyPack,
PatchSiegeAINoPatchableFiles,
SchemaNotProvided,
IVFInvalidSubstraction,
GameDoesntSupportWorkshop(String),
SteamIDDoesntBelongToKnownGame(u64),
GlobalSearchReplaceRequiresSameLengthAndNotRegex,
IOErrorPath(Box<Self>, PathBuf),
TranslatorCouldNotLoadTranslation,
GameInfoMissingFromDecodingFunction,
GameInfoMissingFromEncodingFunction,
IOError(Error),
RonError(Error),
RonSpannedError(SpannedError),
CSVError(Error),
JsonError(Error),
TryFromSliceError(TryFromSliceError),
SystemTimeError(SystemTimeError),
StripPrefixError(StripPrefixError),
TomlError(Error),
XmlRsError(Error),
LogError(SetLoggerError),
Lz4Error(Error),
LzmaError(Error),
ImageError(ImageError),
DDSDecError(DecodingError),
DDSEncError(EncodingError),
DecodingDDSColourFormatUnsupported,
}Expand description
Comprehensive error type for all RPFM library operations.
This enum covers all possible error conditions that can occur when working with
Total War PackFiles and related file formats. Each variant includes descriptive
error messages via the #[error] attribute from the thiserror crate.
§Error Display
All errors implement std::fmt::Display and provide user-friendly error messages.
The error messages are automatically generated from the #[error(...)] attributes.
Variants§
DataCannotBeCompressed
Error when data compression fails.
DataCannotBeDecompressed
Error when data decompression fails.
ManifestFileNotFound
Manifest file for selected game not found.
ManifestFileParseError(String)
Error parsing game’s manifest.txt file.
DecodingNotMoreBytesToDecode
No more bytes available for decoding.
DecodingBoolError(u8)
Invalid byte value for boolean decoding.
DecodingNoBytesLeftError
No bytes remaining for number decoding.
DecodingNotEnoughBytesToDecodeForType(String, usize, Option<usize>)
Insufficient bytes for type decoding.
DecodeIntError(ParseIntError)
Wrapper for integer parsing errors.
DecodeFloatError(ParseFloatError)
Wrapper for float parsing errors.
DecodeUTF8Error(FromUtf8Error)
Wrapper for UTF-8 string conversion errors.
DecodeUTF8StrError(Utf8Error)
Wrapper for UTF-8 string slice validation errors.
DecodeUTF16Error(FromUtf16Error)
Wrapper for UTF-16 string conversion errors.
DecodeUTF16UnevenInputError(usize)
UTF-16 string has odd byte count.
DecodeUTF8FromISO8859Error(String)
ISO-8859-1 to UTF-8 conversion failed.
DecodingStringSizeError(String)
String size cannot be determined.
DecodingOptionalStringBoolError(String)
Optional string missing boolean prefix.
DecodingString0TeminatedNo0Error
Null-terminated string missing terminator.
EncodingPaddedStringError(String, String, usize, usize)
Padded string exceeds maximum length.
GameInstallTypeNotSupported(String, String)
Game install type not supported.
GameInstallLaunchNotSupported(String, String)
Launch command not supported for game install type.
ParseBoolError(String)
Invalid boolean value string.
ReadFileFolderError(String)
File or folder cannot be read.
PackHeaderNotComplete
PackFile header corrupted or unsupported.
PackSubHeaderMissing
PackFile subheader missing or corrupted.
PackIndexesNotComplete
PackFile indexes corrupted or incomplete.
UnknownPFHFileType(String)
Unknown PFH file type.
UnknownPFHVersion(String)
Unknown PFH version.
UnknownESFSignature(String)
Unknown ESF signature string.
UnknownESFSignatureBytes(u8, u8)
Unknown ESF signature bytes.
UnknownEFLineType(String)
Unknown Empire File line type.
UnknownPipeType(String)
Unknown pipe type.
GameDoesntSupportCs2Migration
CS2 migration not supported for this game.
DecodingTextUnsupportedEncodingOrNotATextFile
Text file encoding unsupported or not a text file.
DecodingAnimsTableUnknownVersion(i32)
Unknown anim table version.
DecodingCAVP8UnsupportedFormat
File is not CA_VP8 or IVF format.
DecodingCAVP8IncorrectOrUnknownFrameSize
CA_VP8 frame size invalid.
DecodingESFUnsupportedSignature(u8, u8)
ESF signature not supported.
DecodingESFUnsupportedDataType(u8)
ESF data type not supported.
DecodingESFRecordNameNotFound(u16)
ESF record name not in string table.
DecodingESFStringNotFound(u32)
ESF string not in string table.
EncodingESFUnsupportedSignature(String)
ESF encoding signature not supported.
DecodingFontUnsupportedSignature(Vec<u8>)
Font file signature not supported.
DecodingFastBinUnsupportedSignature(Vec<u8>)
FastBin signature not supported.
DecodingFastBinUnsupportedVersion(String, u16)
FastBin version not supported for decoding.
EncodingFastBinUnsupportedVersion(String, u16)
FastBin version not supported for encoding.
DecodingRigidModelUnsupportedSignature(Vec<u8>)
RigidModel signature not supported.
DecodingRigidModelUnsupportedVersion(u32)
RigidModel version not supported.
DecodingRigidModelUnsupportedMaterialType(u16)
RigidModel material type not supported.
DecodingRigidModelUnknownTextureType(i32)
RigidModel texture type unknown.
DecodingRigidModelUnknownVertexFormat(u16)
RigidModel vertex format unknown.
DecodingRigidModelUnsupportedVertexFormatForMaterial(u16, u16)
RigidModel vertex format incompatible with material.
DecodingGroupFormationsUnknownEnumValue(String, u32)
Group Formations unknown enum value.
DecodingTableCombinedColour
Combined colour field decoding failed.
SoundBankBKHDNotFound
SoundBank BKHD header section missing.
SoundBankUnsupportedSectionFound(String)
SoundBank section type not supported.
SoundBankUnsupportedVersionFound(u32, String)
SoundBank object version not supported.
SoundBankUnsupportedLanguageFound(u32)
SoundBank language ID not supported.
SoundBankUnsupportedObjectTypeFound(u8)
SoundBank object type not supported.
DecodingTableFieldError(u32, u32, String)
Table field decoding failed.
DecodingTableFieldSequenceIndexError(u32, u32, usize, String)
Table sequence field index out of bounds.
DecodingTableFieldSequenceDataError(u32, u32, String, String)
Table sequence field data invalid.
DecodingTableIncomplete(String, Box<TableInMemory>)
Table decoding incomplete with partial data.
DecodingMissingExtraData
Required extra decoding data missing.
DecodingMissingExtraDataField(String)
Extra data field missing or invalid.
DecodingUnsupportedGameSelected(String)
File decoding not supported for selected game.
TableRowWrongFieldCount(usize, usize)
Table row field count mismatch.
EncodingTableWrongFieldType(String, String)
Table field type mismatch.
DecodingDBNoDefinitionsFoundAndEmptyFile
Table definition missing and file empty.
DecodingDBNoDefinitionsFound
Table definition missing from schema.
DecodingDBNotADBTable
File not a valid DB table.
DecodingLocNotALocTable
File not a valid Loc table.
DecodingMatchedCombatNotAMatchedCombatTable
File not a valid Matched Combat table.
DecodingUnitVariantNotAUnitVariant
File not a valid Unit Variant.
DecodingMismatchSizeError(usize, usize)
File size mismatch with expected size.
DecodingPortraitSettingUnsupportedVersion(usize)
Portrait Settings version not supported.
DecodingUnsupportedVersion(usize)
Generic unsupported version error.
DecodingAnimFragmentUnsupportedVersion(usize)
Anim Fragment version not supported.
DecodingMatchedCombatUnsupportedVersion(usize)
Matched Combat version not supported.
DecodedDataDoesNotMatchFileType(FileType, FileType)
Decoded data type doesn’t match expected file type.
DecodingSoundPackedUnsupportedGame(String)
SoundPacked decoding not supported for game.
EncodingSoundPackedUnsupportedGame(String)
SoundPacked encoding not supported for game.
EncodingMissingExtraData
Required extra encoding data missing.
InvalidStateParticipantValue(u32)
Invalid state participant value.
GitErrorDownloadFromRepo(String)
Git repository download or update failed.
GitErrorNoUpdatesAvailable(String)
No updates available for git repository.
FileSourceChanged(String)
File data changed on disk during lazy loading.
DataTooBigForContainer(String, u64, usize, String)
File too large for container.
FileNotFound(String)
File not found in pack.
FileNotDecoded(String)
File not yet decoded.
FileNotCached(String)
File not yet cached.
ReservedFiles
Reserved file operation blocked.
EmptyDestiny
Empty destination path.
NoPacksProvided
No packs provided to operation.
LiveExportNoFilesToExport
Live export has no files to export.
BuildStartposError(String)
Startpos build error.
UpdateAnimIdsError(String)
Animation IDs update error.
MissingSQLitePool
SQLite connection pool not initialized.
PathMissingFileName(String)
Path missing filename component.
DependenciesCacheNotGeneratedorOutOfDate
Dependencies cache not generated or outdated.
DependenciesCacheFileNotFound(String)
File not found in dependencies cache.
NoDefinitionUpdateAvailable
Table already has latest definition.
NoTableInGameFilesToCompare
Table not found in game files for comparison.
AssemblyKitUnsupportedVersion(i16)
Assembly Kit version not supported.
AssemblyKitNotFound
Assembly Kit folder not found or readable.
AssemblyKitTableNotFound(String)
Table not found in Assembly Kit.
AssemblyKitTableTableIgnored
Assembly Kit table blacklisted.
AssemblyKitLocalisableFieldsNotFound
Localisable fields file not found.
AssemblyKitExtraRelationshipsNotFound
Relationships file not found.
RawTableMissingDefinition
Raw table import missing definition.
ImportTSVIncorrectRow(usize, usize)
TSV import row/field error.
ImportTSVWrongTypeTable
TSV file incompatible or wrong type.
ImportTSVInvalidVersion
TSV file has invalid version.
ImportTSVInvalidOrMissingPath
TSV file missing or invalid path.
RFileMergeOnlyOneFileProvided
Merge requires multiple files.
RFileMergeDifferentTypes
Cannot merge files of different types.
RFileMergeTablesDifferentNames
Cannot merge tables with different names.
RFileMergeTablesNotEnoughTablesProvided
Table merge requires at least two tables.
RFileMergeNotSupportedForType(String)
File type doesn’t support merging.
GroupFormationUnknownBlockType(u32)
Group formation block type unknown.
PatchSiegeAIEmptyPack
Cannot patch empty pack.
PatchSiegeAINoPatchableFiles
No patchable files in pack.
SchemaNotProvided
No schema provided when required.
IVFInvalidSubstraction
Invalid subtraction during IVF processing.
GameDoesntSupportWorkshop(String)
Game doesn’t support Steam Workshop.
SteamIDDoesntBelongToKnownGame(u64)
SteamID not recognized as Total War game.
GlobalSearchReplaceRequiresSameLengthAndNotRegex
Global replace requires same byte length without regex.
IOErrorPath(Box<Self>, PathBuf)
IO error with associated path.
TranslatorCouldNotLoadTranslation
No translation found.
GameInfoMissingFromDecodingFunction
GameInfo missing from pack-reading function.
GameInfoMissingFromEncodingFunction
GameInfo missing from pack-saving function.
IOError(Error)
Wrapper for std::io::Error errors.
RonError(Error)
Wrapper for ron::Error errors.
RonSpannedError(SpannedError)
Wrapper for ron::error::SpannedError errors.
CSVError(Error)
Wrapper for [csv::Error] errors.
JsonError(Error)
Wrapper for serde_json::Error errors.
TryFromSliceError(TryFromSliceError)
Wrapper for std::array::TryFromSliceError errors.
SystemTimeError(SystemTimeError)
Wrapper for std::time::SystemTimeError errors.
StripPrefixError(StripPrefixError)
Wrapper for std::path::StripPrefixError errors.
TomlError(Error)
Wrapper for [toml::ser::Error] errors.
XmlRsError(Error)
Wrapper for [serde_xml_rs::Error] errors.
LogError(SetLoggerError)
Wrapper for log::SetLoggerError errors.
Lz4Error(Error)
Wrapper for [lz4_flex::frame::Error] errors.
LzmaError(Error)
Wrapper for [lzma_rs::error::Error] errors.
ImageError(ImageError)
Wrapper for [image::ImageError] errors.
DDSDecError(DecodingError)
Wrapper for [dds::DecodingError] errors.
DDSEncError(EncodingError)
Wrapper for [dds::EncodingError] errors.
DecodingDDSColourFormatUnsupported
DDS colour format not supported.
Trait Implementations§
Source§impl Error for RLibError
impl Error for RLibError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<FromUtf16Error> for RLibError
impl From<FromUtf16Error> for RLibError
Source§fn from(source: FromUtf16Error) -> Self
fn from(source: FromUtf16Error) -> Self
Source§impl From<FromUtf8Error> for RLibError
impl From<FromUtf8Error> for RLibError
Source§fn from(source: FromUtf8Error) -> Self
fn from(source: FromUtf8Error) -> Self
Source§impl From<ParseFloatError> for RLibError
impl From<ParseFloatError> for RLibError
Source§fn from(source: ParseFloatError) -> Self
fn from(source: ParseFloatError) -> Self
Source§impl From<ParseIntError> for RLibError
impl From<ParseIntError> for RLibError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Source§impl From<SetLoggerError> for RLibError
impl From<SetLoggerError> for RLibError
Source§fn from(source: SetLoggerError) -> Self
fn from(source: SetLoggerError) -> Self
Source§impl From<SpannedError> for RLibError
impl From<SpannedError> for RLibError
Source§fn from(source: SpannedError) -> Self
fn from(source: SpannedError) -> Self
Source§impl From<StripPrefixError> for RLibError
impl From<StripPrefixError> for RLibError
Source§fn from(source: StripPrefixError) -> Self
fn from(source: StripPrefixError) -> Self
Source§impl From<SystemTimeError> for RLibError
impl From<SystemTimeError> for RLibError
Source§fn from(source: SystemTimeError) -> Self
fn from(source: SystemTimeError) -> Self
Source§impl From<TryFromSliceError> for RLibError
impl From<TryFromSliceError> for RLibError
Source§fn from(source: TryFromSliceError) -> Self
fn from(source: TryFromSliceError) -> Self
Auto Trait Implementations§
impl Freeze for RLibError
impl !RefUnwindSafe for RLibError
impl Send for RLibError
impl Sync for RLibError
impl Unpin for RLibError
impl UnsafeUnpin for RLibError
impl !UnwindSafe for RLibError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.