/// Flush current batch to the tar archive and set the state to `Closed`
///
/// After this function is called, no more files can be written to the archive and
/// the [push](struct.BatchedMIDIArchive.html#method.push) function will `panic`.
Flush current batch to the tar archive and set the state to `Closed`
After this function is called, no more files can be written to the archive and
the [push](struct.BatchedMIDIArchive.html#method.push) function will `panic`.
Flush current batch to the tar archive and set the state to ` Closed ` After this function is called no more files can be written to the archive and the [ push ] ( struct . BatchedMIDIArchive . html#method . push ) function will ` panic ` .
pub fn finish(&mut self) -> std::io::Result<()> {
        // Check archive state and panic if Closed
        self.assert_open();
        // If batch archive isn't empty, write out
        // compressed batch archive to target archive
        if self.gen_batch_size() > 0 {
            self.flush()?;
        }
        // Finish target archive and set state
        self.target_archive.finish()?;
        self.state = BatchedMIDIArchiveState::Closed;
        Ok(())
    }
pub fn finish ( & mut self ) -> std :: io :: Result < ( ) > { // Check archive state and panic if Closed self . assert_open ( ) ; // If batch archive isn't empty, write out // compressed batch archive to target archive if self . gen_batch_size ( ) > 0 { self . flush ( ) ? ; } // Finish target archive and set state self . target_archive . finish ( ) ? ; self . state = BatchedMIDIArchiveState :: Closed ; Ok ( ( ) ) }
Flush current batch to the tar archive and set the state to `Closed`
After this function is called, no more files can be written to the archive and
the [push](struct.BatchedMIDIArchive.html#method.push) function will `panic`.
Flush current batch to the tar archive and set the state to ` Closed ` After this function is called no more files can be written to the archive and the [ push ] ( struct . BatchedMIDIArchive . html#method . push ) function will ` panic ` .
&mut self