pub async fn close(mut self) -> Result<()> {
        self.writer.shutdown().await?;

        let crc = self.hasher.finalize();
        let uncompressed_size = self.writer.offset() as u32;
        let inner_writer = self.writer.into_inner().into_inner();
        let compressed_size = (inner_writer.offset() - self.data_offset) as u32;

        inner_writer.write_all(&crate::spec::delimiter::DDD.to_le_bytes()).await?;
        inner_writer.write_all(&crc.to_le_bytes()).await?;
        inner_writer.write_all(&compressed_size.to_le_bytes()).await?;
        inner_writer.write_all(&uncompressed_size.to_le_bytes()).await?;

        let cdh = CentralDirectoryHeader {
            compressed_size,
            uncompressed_size,
            crc,
            v_made_by: 0,
            v_needed: 0,
            compression: self.lfh.compression,
            extra_field_length: self.lfh.extra_field_length,
            file_name_length: self.lfh.file_name_length,
            file_comment_length: self.options.comment.len() as u16,
            mod_time: self.lfh.mod_time,
            mod_date: self.lfh.mod_date,
            flags: self.lfh.flags,
            disk_start: 0,
            inter_attr: 0,
            exter_attr: 0,
            lh_offset: self.lfh_offset as u32,
        };

        self.cd_entries.push(CentralDirectoryEntry { header: cdh, opts: self.options });
        Ok(())
    }
/// Consumes this entry writer and completes all closing tasks.
///
/// This includes:
/// - Finalising the CRC32 hash value for the written data.
/// - Calculating the compressed and uncompressed byte sizes.
/// - Constructing a central directory header.
/// - Pushing that central directory header to the [`ZipFileWriter`]'s store.
///
/// Failiure to call this function before going out of scope would result in a corrupted ZIP file.
Consumes this entry writer and completes all closing tasks.
This includes:
Finalising the CRC32 hash value for the written data.
Calculating the compressed and uncompressed byte sizes.
Constructing a central directory header.
Pushing that central directory header to the [`ZipFileWriter`]'s store.

Failiure to call this function before going out of scope would result in a corrupted ZIP file.
Consumes this entry writer and completes all closing tasks . This includes : Finalising the CRC32 hash value for the written data . Calculating the compressed and uncompressed byte sizes . Constructing a central directory header . Pushing that central directory header to the [ ` ZipFileWriter ` ] ' s store . Failiure to call this function before going out of scope would result in a corrupted ZIP file .
pub async fn close(mut self) -> Result<()> {
        self.writer.shutdown().await?;
        let crc = self.hasher.finalize();
        let uncompressed_size = self.writer.offset() as u32;
        let inner_writer = self.writer.into_inner().into_inner();
        let compressed_size = (inner_writer.offset() - self.data_offset) as u32;
        inner_writer.write_all(&crate::spec::delimiter::DDD.to_le_bytes()).await?;
        inner_writer.write_all(&crc.to_le_bytes()).await?;
        inner_writer.write_all(&compressed_size.to_le_bytes()).await?;
        inner_writer.write_all(&uncompressed_size.to_le_bytes()).await?;
        let cdh = CentralDirectoryHeader {
            compressed_size,
            uncompressed_size,
            crc,
            v_made_by: 0,
            v_needed: 0,
            compression: self.lfh.compression,
            extra_field_length: self.lfh.extra_field_length,
            file_name_length: self.lfh.file_name_length,
            file_comment_length: self.options.comment.len() as u16,
            mod_time: self.lfh.mod_time,
            mod_date: self.lfh.mod_date,
            flags: self.lfh.flags,
            disk_start: 0,
            inter_attr: 0,
            exter_attr: 0,
            lh_offset: self.lfh_offset as u32,
        };
        self.cd_entries.push(CentralDirectoryEntry { header: cdh, opts: self.options });
        Ok(())
    }
pub async fn close ( mut self ) -> Result < ( ) > { self . writer . shutdown ( ) . await ? ; let crc = self . hasher . finalize ( ) ; let uncompressed_size = self . writer . offset ( ) as u32 ; let inner_writer = self . writer . into_inner ( ) . into_inner ( ) ; let compressed_size = ( inner_writer . offset ( ) - self . data_offset ) as u32 ; inner_writer . write_all ( & crate :: spec :: delimiter :: DDD . to_le_bytes ( ) ) . await ? ; inner_writer . write_all ( & crc . to_le_bytes ( ) ) . await ? ; inner_writer . write_all ( & compressed_size . to_le_bytes ( ) ) . await ? ; inner_writer . write_all ( & uncompressed_size . to_le_bytes ( ) ) . await ? ; let cdh = CentralDirectoryHeader { compressed_size , uncompressed_size , crc , v_made_by : 0 , v_needed : 0 , compression : self . lfh . compression , extra_field_length : self . lfh . extra_field_length , file_name_length : self . lfh . file_name_length , file_comment_length : self . options . comment . len ( ) as u16 , mod_time : self . lfh . mod_time , mod_date : self . lfh . mod_date , flags : self . lfh . flags , disk_start : 0 , inter_attr : 0 , exter_attr : 0 , lh_offset : self . lfh_offset as u32 , } ; self . cd_entries . push ( CentralDirectoryEntry { header : cdh , opts : self . options } ) ; Ok ( ( ) ) }
Consumes this entry writer and completes all closing tasks.
Consumes this entry writer and completes all closing tasks .
mut self
mut self