pub enum ErfRewriteError {
Io(Error),
NoSuchEntry {
index: usize,
entry_count: usize,
},
DuplicateSubstitution {
index: usize,
},
UnreadableEntry {
index: usize,
resref: ResRef,
defect: EntryDefect,
},
OverlappingPayload {
index: usize,
offset: u64,
earliest: u64,
},
KeyNamesMissingResourceRow {
index: usize,
row: usize,
},
RegionOutsidePrefix {
region: &'static str,
region_end: usize,
prefix_end: usize,
},
TruncatedEntry {
index: usize,
expected: u64,
copied: u64,
},
ValueOverflow(&'static str),
}Expand description
Errors produced while rewriting an ERF-family archive.
Variants§
Io(Error)
I/O read/write failure.
NoSuchEntry
A substitution named an entry the archive does not have.
Fields
DuplicateSubstitution
Two substitutions named the same entry.
UnreadableEntry
An entry that was not being replaced cannot be read.
Substituting the entry is the way past this: supplying its bytes means the unreadable range is never touched, which is how a damaged archive gets repaired rather than refused.
Fields
defect: EntryDefectWhy its bytes are unreachable.
OverlappingPayload
Two entries claim overlapping byte ranges.
Fields
KeyNamesMissingResourceRow
A key entry points at a resource row outside the resource table.
RegionOutsidePrefix
A table lies outside the span copied verbatim from the source.
The header, the localized string block and both tables are copied as one region ending at the resource table. A file that puts one of them somewhere else is one the engine’s own sequential reader mis-parses, so it is refused rather than silently truncated.
Fields
TruncatedEntry
An entry’s bytes ran out before its declared size.
Fields
ValueOverflow(&'static str)
Value cannot fit the on-disk integer width.
Trait Implementations§
Source§impl Debug for ErfRewriteError
impl Debug for ErfRewriteError
Source§impl Display for ErfRewriteError
impl Display for ErfRewriteError
Source§impl Error for ErfRewriteError
impl Error for ErfRewriteError
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
use the Display impl or to_string()