pub(crate) fn write_ssbh_file<W: Write + Seek, S: SsbhWrite>(
    writer: &mut W,
    data: &S,
    magic: &[u8; 4],
) -> std::io::Result<()> {
    write_ssbh_header(writer, magic)?;
    let mut data_ptr = writer.stream_position()?;

    // Point past the struct.
    data_ptr += data.size_in_bytes(); // size of fields

    data.ssbh_write(writer, &mut data_ptr)?;
    Ok(())
}
// TODO: This can probably just be derived.
This can probably just be derived.
This can probably just be derived .
pub(crate) fn write_ssbh_file<W: Write + Seek, S: SsbhWrite>(
    writer: &mut W,
    data: &S,
    magic: &[u8; 4],
) -> std::io::Result<()> {
    write_ssbh_header(writer, magic)?;
    let mut data_ptr = writer.stream_position()?;
    // Point past the struct.
    data_ptr += data.size_in_bytes(); // size of fields
    data.ssbh_write(writer, &mut data_ptr)?;
    Ok(())
}
pub ( crate ) fn write_ssbh_file < W : Write + Seek , S : SsbhWrite > ( writer : & mut W , data : & S , magic : & [ u8 ; 4 ] , ) -> std :: io :: Result < ( ) > { write_ssbh_header ( writer , magic ) ? ; let mut data_ptr = writer . stream_position ( ) ? ; // Point past the struct. data_ptr += data . size_in_bytes ( ) ; // size of fields data . ssbh_write ( writer , & mut data_ptr ) ? ; Ok ( ( ) ) }
TODO: This can probably just be derived.
TODO : This can probably just be derived .
writer
&mut W
data
&S
magic
&[u8; 4]
writer
&mut W
data
&S
magic
&[u8; 4]