pub struct ApplyOption {
pub kind: ApplyOptionKind,
pub value: bool,
}Expand description
APLY chunk: sets or clears a boolean flag on the crate::ApplyContext.
Each APLY chunk carries one flag selector (ApplyOptionKind) and one
boolean value. When applied, the corresponding field on crate::ApplyContext
is updated. In all FFXIV patch files observed by the XIVLauncher project,
both flags are set to false — the chunk exists to allow SE’s tooling to
override the defaults without hard-coding them.
See lib/FFXIVQuickLauncher/.../Chunk/ApplyOptionChunk.cs.
§Wire format
[kind: u32 BE] [padding: 4 bytes] [value: u32 BE, non-zero = true]The 4-byte padding between kind and value is always 0x00000004 in
observed files, but the reference implementation discards it without
checking.
§Errors
Parsing fails with crate::ZiPatchError::BinrwError if:
- the
kindfield is not1or2(unrecognised option), or - the body is too short to contain all three 4-byte fields.
Fields§
§kind: ApplyOptionKindWhich crate::ApplyContext flag this chunk targets.
Encoded as a u32 big-endian on the wire; mapped to ApplyOptionKind
during parsing.
value: boolNew value for the targeted flag.
On the wire: a u32 BE preceded by 4 bytes of padding (pad_before = 4).
Any non-zero value is treated as true.
Trait Implementations§
Source§impl Apply for ApplyOption
Updates ApplyContext ignore-flags from the chunk payload.
impl Apply for ApplyOption
Updates ApplyContext ignore-flags from the chunk payload.
ApplyOption chunks are embedded in the patch stream to toggle
ApplyContext::ignore_missing and ApplyContext::ignore_old_mismatch
at specific points during apply. Applying this chunk mutates ctx in
place; no filesystem I/O is performed.
Source§impl BinRead for ApplyOption
impl BinRead for ApplyOption
Source§fn read_options<R: Read + Seek>(
__binrw_generated_var_reader: &mut R,
__binrw_generated_var_endian: Endian,
__binrw_generated_var_arguments: Self::Args<'_>,
) -> BinResult<Self>
fn read_options<R: Read + Seek>( __binrw_generated_var_reader: &mut R, __binrw_generated_var_endian: Endian, __binrw_generated_var_arguments: Self::Args<'_>, ) -> BinResult<Self>
Source§fn read<R>(reader: &mut R) -> Result<Self, Error>
fn read<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments. Read moreSource§fn read_be<R>(reader: &mut R) -> Result<Self, Error>
fn read_be<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
big-endian byte order. Read moreSource§fn read_le<R>(reader: &mut R) -> Result<Self, Error>
fn read_le<R>(reader: &mut R) -> Result<Self, Error>
Self from the reader using default arguments and assuming
little-endian byte order. Read moreSource§fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
fn read_ne<R>(reader: &mut R) -> Result<Self, Error>
T from the reader assuming native-endian byte order. Read moreSource§fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader using the given arguments. Read moreSource§fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
fn read_be_args<R>(reader: &mut R, args: Self::Args<'_>) -> Result<Self, Error>
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for ApplyOption
impl Clone for ApplyOption
Source§fn clone(&self) -> ApplyOption
fn clone(&self) -> ApplyOption
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 ApplyOption
impl Debug for ApplyOption
Source§impl PartialEq for ApplyOption
impl PartialEq for ApplyOption
Source§fn eq(&self, other: &ApplyOption) -> bool
fn eq(&self, other: &ApplyOption) -> bool
self and other values to be equal, and is used by ==.Source§impl ReadEndian for ApplyOption
impl ReadEndian for ApplyOption
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
impl Eq for ApplyOption
impl StructuralPartialEq for ApplyOption
Auto Trait Implementations§
impl Freeze for ApplyOption
impl RefUnwindSafe for ApplyOption
impl Send for ApplyOption
impl Sync for ApplyOption
impl Unpin for ApplyOption
impl UnsafeUnpin for ApplyOption
impl UnwindSafe for ApplyOption
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