pub struct ErfIndexEntry {
pub resref: ResRef,
pub name_as_read: [u8; 16],
pub resource_type: ResourceTypeCode,
pub offset: u64,
pub size: u64,
pub defect: Option<EntryDefect>,
}Expand description
One indexed resource: its identity and where its bytes live.
Offsets are relative to the start of the archive, which for a nested archive is the start of its window rather than the start of the file.
Fields§
§resref: ResRefResource name.
name_as_read: [u8; 16]The key exactly as the file spelled it.
The lazy counterpart to
ErfResource::name_as_read, and
always present here because an index is only ever read from a file.
Carried so a rewrite assembled through this index puts back the casing
the archive had rather than the folded form a ResRef keeps.
resource_type: ResourceTypeCodeResource type code.
offset: u64Byte offset of the resource data within the archive, as declared by the entry table.
size: u64Byte length of the resource data, as declared by the entry table.
defect: Option<EntryDefect>Set when the entry cannot be read, leaving the rest of the archive usable. Reading a defective entry returns this as an error.
Implementations§
Source§impl ErfIndexEntry
impl ErfIndexEntry
Sourcepub fn is_readable(&self) -> bool
pub fn is_readable(&self) -> bool
Returns whether this entry’s bytes can be read.
Trait Implementations§
Source§impl Clone for ErfIndexEntry
impl Clone for ErfIndexEntry
Source§fn clone(&self) -> ErfIndexEntry
fn clone(&self) -> ErfIndexEntry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ErfIndexEntry
impl Debug for ErfIndexEntry
Source§impl PartialEq for ErfIndexEntry
impl PartialEq for ErfIndexEntry
Source§fn eq(&self, other: &ErfIndexEntry) -> bool
fn eq(&self, other: &ErfIndexEntry) -> bool
self and other values to be equal, and is used by ==.