#[non_exhaustive]pub enum FileHeader {
V2(FileHeaderV2),
V3(FileHeaderV3),
}Expand description
FHDR chunk: patch file header with a version-specific body.
This is always the first chunk in a well-formed ZiPatch file, immediately
following the 12-byte file magic. The version byte selects whether a v2 or
v3 body follows.
§Wire format
[version_word: i32 LE] -- version = bits 16..23 of this word
[body: version-specific] -- FileHeaderV2 or FileHeaderV3 (big-endian)
[trailing: 0x08 or 0xB8 bytes of zeros/unknowns, ignored]The version word is the only little-endian field in the chunk. The rest of the header is big-endian, matching the rest of the format.
§Errors
Parsing fails with crate::ZiPatchError::BinrwError if the body is too
short to contain the full version-specific fields.
See lib/FFXIVQuickLauncher/.../Chunk/FileHeaderChunk.cs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
V2(FileHeaderV2)
Version 2 header — older patches with minimal metadata.
V3(FileHeaderV3)
Version 3 header — modern patches with full statistical summary.
Implementations§
Source§impl FileHeader
impl FileHeader
Sourcepub fn version(&self) -> u8
pub fn version(&self) -> u8
Returns the format version number: 2 for FileHeader::V2, 3 for
FileHeader::V3.
Sourcepub fn patch_type(&self) -> &[u8; 4]
pub fn patch_type(&self) -> &[u8; 4]
Returns the 4-byte ASCII patch type tag (e.g. b"D000" or b"H000").
Delegates to the inner FileHeaderV2::patch_type or
FileHeaderV3::patch_type field without copying.
Trait Implementations§
Source§impl Clone for FileHeader
impl Clone for FileHeader
Source§fn clone(&self) -> FileHeader
fn clone(&self) -> FileHeader
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 FileHeader
impl Debug for FileHeader
Source§impl PartialEq for FileHeader
impl PartialEq for FileHeader
Source§fn eq(&self, other: &FileHeader) -> bool
fn eq(&self, other: &FileHeader) -> bool
self and other values to be equal, and is used by ==.impl Eq for FileHeader
impl StructuralPartialEq for FileHeader
Auto Trait Implementations§
impl Freeze for FileHeader
impl RefUnwindSafe for FileHeader
impl Send for FileHeader
impl Sync for FileHeader
impl Unpin for FileHeader
impl UnsafeUnpin for FileHeader
impl UnwindSafe for FileHeader
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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