pub trait Xc3WriteOffsets {
type Args;
// Required method
fn write_offsets<W: Write + Seek>(
&self,
writer: &mut W,
base_offset: u64,
data_ptr: &mut u64,
endian: Endian,
args: Self::Args,
) -> Xc3Result<()>;
}Expand description
The layout pass that updates and writes data for all fields in Xc3Write::Offsets recursively.
Required Associated Types§
Required Methods§
Sourcefn write_offsets<W: Write + Seek>(
&self,
writer: &mut W,
base_offset: u64,
data_ptr: &mut u64,
endian: Endian,
args: Self::Args,
) -> Xc3Result<()>
fn write_offsets<W: Write + Seek>( &self, writer: &mut W, base_offset: u64, data_ptr: &mut u64, endian: Endian, args: Self::Args, ) -> Xc3Result<()>
Update and write pointed to data for all fields in Xc3Write::Offsets.
The goal is to call Offset::write or Xc3WriteOffsets::write_offsets
in increasing order by absolute offset stored in data_ptr.
For writing in order by field recursively, simply derive Xc3WriteOffsets.
Manually implementing this trait allows flexibility for cases like placing strings
for all types at the end of the file.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.