pub struct SqpkAddData {
pub target_file: SqpackFile,
pub block_offset: u64,
pub data_bytes: u64,
pub block_delete_number: u64,
pub data: Vec<u8>,
}Expand description
SQPK A command body: write data into a .dat file at block_offset,
then zero block_delete_number bytes after it.
Fields§
§target_file: SqpackFileSqPack file the write targets.
block_offset: u64Destination offset within the .dat file (raw u32 shifted left 7 bits).
data_bytes: u64Length of the inline data payload (raw u32 shifted left 7 bits).
block_delete_number: u64Number of bytes to zero immediately after the payload write.
data: Vec<u8>Inline payload of length data_bytes.
Implementations§
Source§impl SqpkAddData
impl SqpkAddData
Sourcepub const DATA_SOURCE_OFFSET: u64 = SQPK_ADDDATA_HEADER_SIZE
pub const DATA_SOURCE_OFFSET: u64 = SQPK_ADDDATA_HEADER_SIZE
Byte offset of the data field within the SQPK command body slice.
Add the chunk’s absolute file position to get the patch-file offset
needed for IndexedZiPatch random-access reads.
Trait Implementations§
Source§impl BinRead for SqpkAddData
impl BinRead for SqpkAddData
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>
Read
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>
Read
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>
Read
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>
Read
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>
Read
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>
Read
Self from the reader, assuming big-endian byte order, using the
given arguments. Read moreSource§impl Clone for SqpkAddData
impl Clone for SqpkAddData
Source§fn clone(&self) -> SqpkAddData
fn clone(&self) -> SqpkAddData
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 SqpkAddData
impl Debug for SqpkAddData
Source§impl PartialEq for SqpkAddData
impl PartialEq for SqpkAddData
Source§fn eq(&self, other: &SqpkAddData) -> bool
fn eq(&self, other: &SqpkAddData) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl ReadEndian for SqpkAddData
impl ReadEndian for SqpkAddData
Source§const ENDIAN: EndianKind
const ENDIAN: EndianKind
The endianness of the type.
impl Eq for SqpkAddData
impl StructuralPartialEq for SqpkAddData
Auto Trait Implementations§
impl Freeze for SqpkAddData
impl RefUnwindSafe for SqpkAddData
impl Send for SqpkAddData
impl Sync for SqpkAddData
impl Unpin for SqpkAddData
impl UnsafeUnpin for SqpkAddData
impl UnwindSafe for SqpkAddData
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