/// Seek back to the meta data, write offset tables, and flush the byte writer.
/// Leaves the writer seeked to the middle of the file.
Seek back to the meta data, write offset tables, and flush the byte writer.
Leaves the writer seeked to the middle of the file.
Seek back to the meta data write offset tables and flush the byte writer . Leaves the writer seeked to the middle of the file .
fn complete_meta_data(mut self) -> UnitResult {
        if self.chunk_indices_increasing_y.iter().flatten().any(|&index| index == 0) {
            return Err(Error::invalid("some chunks are not written yet"))
        }
        // write all offset tables
        debug_assert_ne!(self.byte_writer.byte_position(), self.chunk_indices_byte_location.end, "offset table has already been updated");
        self.byte_writer.seek_write_to(self.chunk_indices_byte_location.start)?;
        for table in self.chunk_indices_increasing_y {
            u64::write_slice(&mut self.byte_writer, table.as_slice())?;
        }
        self.byte_writer.flush()?; // make sure we catch all (possibly delayed) io errors before returning
        Ok(())
    }
fn complete_meta_data ( mut self ) -> UnitResult { if self . chunk_indices_increasing_y . iter ( ) . flatten ( ) . any ( | & index | index == 0 ) { return Err ( Error :: invalid ( " " ) ) } // write all offset tables debug_assert_ne ! ( self byte_writer byte_position ( ) self chunk_indices_byte_location end " " ) ; self . byte_writer . seek_write_to ( self . chunk_indices_byte_location . start ) ? ; for table in self . chunk_indices_increasing_y { u64 :: write_slice ( & mut self . byte_writer , table . as_slice ( ) ) ? ; } self . byte_writer . flush ( ) ? ; // make sure we catch all (possibly delayed) io errors before returning Ok ( ( ) ) }
Seek back to the meta data, write offset tables, and flush the byte writer.
Seek back to the meta data write offset tables and flush the byte writer .
mut self