WriteFull

Trait WriteFull 

Source
pub trait WriteFull {
    type Args;

    // Required method
    fn write_full<W: Write + Seek>(
        &self,
        writer: &mut W,
        base_offset: u64,
        data_ptr: &mut u64,
        endian: Endian,
        offset_args: Self::Args,
    ) -> Xc3Result<()>;
}
Expand description

A complete writing combining Xc3Write and Xc3WriteOffsets.

Most types should rely on the blanket impl. For types without offsets, simply set Xc3WriteOffsets::Args to the unit type ().

Required Associated Types§

Required Methods§

Source

fn write_full<W: Write + Seek>( &self, writer: &mut W, base_offset: u64, data_ptr: &mut u64, endian: Endian, offset_args: Self::Args, ) -> Xc3Result<()>

A complete write uses a two pass approach to handle offsets.

We can fully write any type that can fully write its offset values. This includes types with an offset type of () like primitive types.

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.

Implementors§

Source§

impl<T, A> WriteFull for T
where T: Xc3Write, for<'a> T::Offsets<'a>: Xc3WriteOffsets<Args = A>,

Source§

type Args = A