Trait xc3_write::Xc3WriteOffsets
source · pub trait Xc3WriteOffsets {
// Required method
fn write_offsets<W: Write + Seek>(
&self,
writer: &mut W,
base_offset: u64,
data_ptr: &mut u64
) -> Xc3Result<()>;
}Expand description
The layout pass that updates and writes data for all fields in Xc3Write::Offsets recursively.
Required Methods§
sourcefn write_offsets<W: Write + Seek>(
&self,
writer: &mut W,
base_offset: u64,
data_ptr: &mut u64
) -> Xc3Result<()>
fn write_offsets<W: Write + Seek>( &self, writer: &mut W, base_offset: u64, data_ptr: &mut u64 ) -> Xc3Result<()>
Update and write pointed to data for all fields in Xc3Write::Offsets.
The goal is to call Offset::write_offset 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.
Object Safety§
This trait is not object safe.