Skip to main content

hurray_file_writer_destroy

Function hurray_file_writer_destroy 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn hurray_file_writer_destroy( handle: *mut *mut HurrayFileWriter, ) -> HurrayStatus
Expand description

Destroys a writer, releases its transport context, and writes null through handle.

Destroying a writer that was never finished leaves a file with no footer, which no reader can open — the bytes are not a container until hurray_file_writer_finish has written its index and trailer.

§Safety

  • handle MUST be a valid, non-null pointer to a *mut HurrayFileWriter from hurray_file_writer_new.
  • That writer MUST NOT have been destroyed already.