#[unsafe(no_mangle)]pub unsafe extern "C" fn hurray_file_writer_new(
transport: *const HurrayTransport,
options: *const HurrayFileWriterOptions,
out_handle: *mut *mut HurrayFileWriter,
) -> HurrayStatusExpand description
Creates a file writer over transport and writes the 64-byte file header.
The header goes out here, not on the first tensor, which is what makes every later offset in the file knowable without seeking back.
§Arguments
transport— Non-null; itswritecallback MUST be non-null.read_atandsizeare not used: a file writer never reads what it has written.options— MAY be null forHurrayFileWriterOptions’ documented defaults.out_handle— Non-null pointer to a*mut HurrayFileWriter; set on success.
Returns HURRAY_ERR_INVALID_FILE if
data_buffer_alignment is not a power of two in range.
§Safety
transportMUST point to a readableHurrayTransportfor the duration of the call.options, if non-null, MUST point to a readableHurrayFileWriterOptions.out_handleMUST be a valid, non-null, writable pointer.