pub enum TargetHeaderKind {
Version,
Index,
Data,
}Expand description
Which header slot a SqpkHeader writes into.
SqPack files contain two 1024-byte header regions at fixed offsets:
| Variant | File offset | Description |
|---|---|---|
Version | 0 | Version/magic header |
Index | 1024 | Index structure header |
Data | 1024 | Data structure header |
Both Index and Data map to file offset 1024; the distinction is semantic
(which file type they accompany) but the write offset is the same for both.
Encoded as a single ASCII byte: b'V' → Version, b'I' → Index,
b'D' → Data. Any other byte is rejected with a binrw::Error::Custom.
Variants§
Version
Version header, written at file offset 0.
Index
Index header, written at file offset 1024.
Data
Data header, written at file offset 1024.
Trait Implementations§
Source§impl Clone for TargetHeaderKind
impl Clone for TargetHeaderKind
Source§fn clone(&self) -> TargetHeaderKind
fn clone(&self) -> TargetHeaderKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TargetHeaderKind
impl Debug for TargetHeaderKind
Source§impl PartialEq for TargetHeaderKind
impl PartialEq for TargetHeaderKind
Source§fn eq(&self, other: &TargetHeaderKind) -> bool
fn eq(&self, other: &TargetHeaderKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TargetHeaderKind
impl Eq for TargetHeaderKind
impl StructuralPartialEq for TargetHeaderKind
Auto Trait Implementations§
impl Freeze for TargetHeaderKind
impl RefUnwindSafe for TargetHeaderKind
impl Send for TargetHeaderKind
impl Sync for TargetHeaderKind
impl Unpin for TargetHeaderKind
impl UnsafeUnpin for TargetHeaderKind
impl UnwindSafe for TargetHeaderKind
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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