/// Write an exr file by writing one chunk after another in a closure.
/// In the closure, you are provided a chunk writer, which should be used to write all the chunks.
/// Assumes the your write destination is buffered.
Write an exr file by writing one chunk after another in a closure.
In the closure, you are provided a chunk writer, which should be used to write all the chunks.
Assumes the your write destination is buffered.
Write an exr file by writing one chunk after another in a closure . In the closure you are provided a chunk writer which should be used to write all the chunks . Assumes the your write destination is buffered .
pub fn write_chunks_with<W: Write + Seek>(
    buffered_write: W, headers: Headers, pedantic: bool,
    write_chunks: impl FnOnce(MetaData, &mut ChunkWriter<W>) -> UnitResult
) -> UnitResult {
    // this closure approach ensures that after writing all chunks, the file is always completed and checked and flushed
    let (meta, mut writer) = ChunkWriter::new_for_buffered(buffered_write, headers, pedantic)?;
    write_chunks(meta, &mut writer)?;
    writer.complete_meta_data()
}
pub fn write_chunks_with < W : Write + Seek > ( buffered_write : W , headers : Headers , pedantic : bool , write_chunks : impl FnOnce ( MetaData , & mut ChunkWriter < W > ) -> UnitResult ) -> UnitResult { // this closure approach ensures that after writing all chunks, the file is always completed and checked and flushed let ( meta , mut writer ) = ChunkWriter :: new_for_buffered ( buffered_write , headers , pedantic ) ? ; write_chunks ( meta , & mut writer ) ? ; writer . complete_meta_data ( ) }
Write an exr file by writing one chunk after another in a closure.
Write an exr file by writing one chunk after another in a closure .
buffered_write
W
headers
Headers
pedantic
bool
write_chunks
impl FnOnce(MetaData, &mut ChunkWriter<W>) -> UnitResult