| 1 | // Copyright (c) 2021 Harry [Majored] [[email protected]] |
| 2 | // MIT License (https://github.com/Majored/rs-async-zip/blob/main/LICENSE) |
| 3 | |
| 4 | use craterust-analyzer cargo async_zip 0.0.18 crate/::baserust-analyzer cargo async_zip 0.0.18 base/::writerust-analyzer cargo async_zip 0.0.18 base/write/::compressed_writerrust-analyzer cargo async_zip 0.0.18 base/write/compressed_writer/::CompressedAsyncWriterrust-analyzer cargo async_zip 0.0.18 base/write/compressed_writer/CompressedAsyncWriter#; |
| 5 | use craterust-analyzer cargo async_zip 0.0.18 crate/::baserust-analyzer cargo async_zip 0.0.18 base/::writerust-analyzer cargo async_zip 0.0.18 base/write/::get_or_put_info_zip_unicode_comment_extra_field_mutrust-analyzer cargo async_zip 0.0.18 base/write/get_or_put_info_zip_unicode_comment_extra_field_mut().; |
| 6 | use craterust-analyzer cargo async_zip 0.0.18 crate/::baserust-analyzer cargo async_zip 0.0.18 base/::writerust-analyzer cargo async_zip 0.0.18 base/write/::get_or_put_info_zip_unicode_path_extra_field_mutrust-analyzer cargo async_zip 0.0.18 base/write/get_or_put_info_zip_unicode_path_extra_field_mut().; |
| 7 | use craterust-analyzer cargo async_zip 0.0.18 crate/::baserust-analyzer cargo async_zip 0.0.18 base/::writerust-analyzer cargo async_zip 0.0.18 base/write/::iorust-analyzer cargo async_zip 0.0.18 base/write/io/::offsetrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/::AsyncOffsetWriterrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/AsyncOffsetWriter#; |
| 8 | use craterust-analyzer cargo async_zip 0.0.18 crate/::baserust-analyzer cargo async_zip 0.0.18 base/::writerust-analyzer cargo async_zip 0.0.18 base/write/::CentralDirectoryEntryrust-analyzer cargo async_zip 0.0.18 base/write/CentralDirectoryEntry#; |
| 9 | use craterust-analyzer cargo async_zip 0.0.18 crate/::baserust-analyzer cargo async_zip 0.0.18 base/::writerust-analyzer cargo async_zip 0.0.18 base/write/::ZipFileWriterrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#; |
| 10 | use craterust-analyzer cargo async_zip 0.0.18 crate/::entryrust-analyzer cargo async_zip 0.0.18 entry/::ZipEntryrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#; |
| 11 | use craterust-analyzer cargo async_zip 0.0.18 crate/::errorrust-analyzer cargo async_zip 0.0.18 error/::{Resultrust-analyzer cargo async_zip 0.0.18 error/Result#, Zip64ErrorCaserust-analyzer cargo async_zip 0.0.18 error/Zip64ErrorCase#, ZipErrorrust-analyzer cargo async_zip 0.0.18 error/ZipError#}; |
| 12 | use craterust-analyzer cargo async_zip 0.0.18 crate/::specrust-analyzer cargo async_zip 0.0.18 spec/::extra_fieldrust-analyzer cargo async_zip 0.0.18 spec/extra_field/::ExtraFieldAsBytesrust-analyzer cargo async_zip 0.0.18 spec/extra_field/ExtraFieldAsBytes#; |
| 13 | use craterust-analyzer cargo async_zip 0.0.18 crate/::specrust-analyzer cargo async_zip 0.0.18 spec/::headerrust-analyzer cargo async_zip 0.0.18 spec/header/::InfoZipUnicodeCommentExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodeCommentExtraField#; |
| 14 | use craterust-analyzer cargo async_zip 0.0.18 crate/::specrust-analyzer cargo async_zip 0.0.18 spec/::headerrust-analyzer cargo async_zip 0.0.18 spec/header/::InfoZipUnicodePathExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodePathExtraField#; |
| 15 | use craterust-analyzer cargo async_zip 0.0.18 crate/::specrust-analyzer cargo async_zip 0.0.18 spec/::headerrust-analyzer cargo async_zip 0.0.18 spec/header/::{ |
| 16 | CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#, ExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/ExtraField#, GeneralPurposeFlagrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#, HeaderIdrust-analyzer cargo async_zip 0.0.18 spec/header/HeaderId#, LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#, |
| 17 | Zip64ExtendedInformationExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#, |
| 18 | }; |
| 19 | use craterust-analyzer cargo async_zip 0.0.18 crate/::stringrust-analyzer cargo async_zip 0.0.18 string/::StringEncodingrust-analyzer cargo async_zip 0.0.18 string/StringEncoding#; |
| 20 | |
| 21 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::iorust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/::Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#; |
| 22 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/::Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#; |
| 23 | use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::taskrust-analyzer cargo std https://github.com/rust-lang/rust/library/std task/::{Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#, Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#}; |
| 24 | |
| 25 | use craterust-analyzer cargo async_zip 0.0.18 crate/::baserust-analyzer cargo async_zip 0.0.18 base/::readrust-analyzer cargo async_zip 0.0.18 base/read/::get_zip64_extra_field_mutrust-analyzer cargo async_zip 0.0.18 base/read/get_zip64_extra_field_mut().; |
| 26 | use craterust-analyzer cargo async_zip 0.0.18 crate/::specrust-analyzer cargo async_zip 0.0.18 spec/::constsrust-analyzer cargo async_zip 0.0.18 spec/consts/::{NON_ZIP64_MAX_NUM_FILESrust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_NUM_FILES., NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE.}; |
| 27 | use crc32fastrust-analyzer cargo crc32fast 1.4.2 crate/::Hasherrust-analyzer cargo crc32fast 1.4.2 Hasher#; |
| 28 | use futures_literust-analyzer cargo futures-lite 2.1.0 crate/::iorust-analyzer cargo futures-lite 2.1.0 io/::{AsyncWriterust-analyzer cargo futures-io 0.3.25 if_std/AsyncWrite#, AsyncWriteExtrust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#}; |
| 29 | |
| 30 | /// An entry writer which supports the streaming of data (ie. the writing of unknown size or data at runtime). |
| 31 | /// |
| 32 | /// # Note |
| 33 | /// - This writer cannot be manually constructed; instead, use [`ZipFileWriter::write_entry_stream()`]. |
| 34 | /// - [`EntryStreamWriter::close()`] must be called before a stream writer goes out of scope. |
| 35 | /// - Utilities for working with [`AsyncWrite`] values are provided by [`AsyncWriteExt`]. |
| 36 | pub struct EntryStreamWriterrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#<'b, W: AsyncWriterust-analyzer cargo futures-io 0.3.25 if_std/AsyncWrite# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#> { |
| 37 | writerrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#writer.: AsyncOffsetWriterrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/AsyncOffsetWriter#<CompressedAsyncWriterrust-analyzer cargo async_zip 0.0.18 base/write/compressed_writer/CompressedAsyncWriter#<'b, W>>, |
| 38 | cd_entriesrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#cd_entries.: &'b mut Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<CentralDirectoryEntryrust-analyzer cargo async_zip 0.0.18 base/write/CentralDirectoryEntry#>, |
| 39 | entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry.: ZipEntryrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#, |
| 40 | hasherrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#hasher.: Hasherrust-analyzer cargo crc32fast 1.4.2 Hasher#, |
| 41 | lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh.: LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#, |
| 42 | lfh_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh_offset.: u64, |
| 43 | data_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#data_offset.: u64, |
| 44 | force_no_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#force_no_zip64.: bool, |
| 45 | /// To write back to the original writer if zip64 is required. |
| 46 | is_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#is_zip64.: &'b mut bool, |
| 47 | precompressedrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#precompressed.: bool, |
| 48 | } |
| 49 | |
| 50 | impl<'b, W: AsyncWriterust-analyzer cargo futures-io 0.3.25 if_std/AsyncWrite# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#> EntryStreamWriterrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#<'b, W> { |
| 51 | pub(craterust-analyzer cargo async_zip 0.0.18 crate/) async fn from_rawrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'b, W>`]from_raw().( |
| 52 | writer: &'b mut ZipFileWriterrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#<W>, |
| 53 | mut entry: ZipEntryrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#, |
| 54 | ) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<EntryStreamWriterrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#<'b, W>> { |
| 55 | let lfh_offset = writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer..offsetrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`]offset().(); |
| 56 | let lfh = EntryStreamWriterrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#::write_lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'b, W>`]write_lfh().(writer, &mut entry).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 57 | let data_offset = writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer..offsetrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`]offset().(); |
| 58 | let force_no_zip64 = writer.force_no_zip64rust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#force_no_zip64.; |
| 59 | |
| 60 | let cd_entries = &mut writer.cd_entriesrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#cd_entries.; |
| 61 | let is_zip64 = &mut writer.is_zip64rust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#is_zip64.; |
| 62 | let writer = |
| 63 | AsyncOffsetWriterrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/AsyncOffsetWriter#::newrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`]new().(CompressedAsyncWriterrust-analyzer cargo async_zip 0.0.18 base/write/compressed_writer/CompressedAsyncWriter#::from_rawrust-analyzer cargo async_zip 0.0.18 base/write/compressed_writer/impl#[`CompressedAsyncWriter<'b, W>`]from_raw().(&mut writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer., entry.compressionrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]compression().(), false)); |
| 64 | |
| 65 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(EntryStreamWriterrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter# { |
| 66 | writerrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#writer., |
| 67 | cd_entriesrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#cd_entries., |
| 68 | entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry., |
| 69 | lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh., |
| 70 | lfh_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh_offset., |
| 71 | data_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#data_offset., |
| 72 | hasherrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#hasher.: Hasherrust-analyzer cargo crc32fast 1.4.2 Hasher#::newrust-analyzer cargo crc32fast 1.4.2 impl#[Hasher]new().(), |
| 73 | force_no_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#force_no_zip64., |
| 74 | is_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#is_zip64., |
| 75 | precompressedrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#precompressed.: false, |
| 76 | }) |
| 77 | } |
| 78 | |
| 79 | pub(craterust-analyzer cargo async_zip 0.0.18 crate/) async fn from_raw_precompressedrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'b, W>`]from_raw_precompressed().( |
| 80 | writer: &'b mut ZipFileWriterrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#<W>, |
| 81 | mut entry: ZipEntryrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#, |
| 82 | ) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<EntryStreamWriterrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#<'b, W>> { |
| 83 | let lfh_offset = writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer..offsetrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`]offset().(); |
| 84 | let lfh = EntryStreamWriterrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#::write_lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'b, W>`]write_lfh().(writer, &mut entry).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/Future#poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 85 | let data_offset = writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer..offsetrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`]offset().(); |
| 86 | let force_no_zip64 = writer.force_no_zip64rust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#force_no_zip64.; |
| 87 | |
| 88 | let cd_entries = &mut writer.cd_entriesrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#cd_entries.; |
| 89 | let is_zip64 = &mut writer.is_zip64rust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#is_zip64.; |
| 90 | let writer = |
| 91 | AsyncOffsetWriterrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/AsyncOffsetWriter#::newrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`]new().(CompressedAsyncWriterrust-analyzer cargo async_zip 0.0.18 base/write/compressed_writer/CompressedAsyncWriter#::from_rawrust-analyzer cargo async_zip 0.0.18 base/write/compressed_writer/impl#[`CompressedAsyncWriter<'b, W>`]from_raw().(&mut writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer., entry.compressionrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]compression().(), true)); |
| 92 | |
| 93 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(EntryStreamWriterrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter# { |
| 94 | writerrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#writer., |
| 95 | cd_entriesrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#cd_entries., |
| 96 | entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry., |
| 97 | lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh., |
| 98 | lfh_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh_offset., |
| 99 | data_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#data_offset., |
| 100 | hasherrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#hasher.: Hasherrust-analyzer cargo crc32fast 1.4.2 Hasher#::newrust-analyzer cargo crc32fast 1.4.2 impl#[Hasher]new().(), |
| 101 | force_no_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#force_no_zip64., |
| 102 | is_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#is_zip64., |
| 103 | precompressedrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#precompressed.: true, |
| 104 | }) |
| 105 | } |
| 106 | |
| 107 | async fn write_lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'b, W>`]write_lfh().(writer: &'b mut ZipFileWriterrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#<W>, entry: &mut ZipEntryrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#> { |
| 108 | // Always emit a zip64 extended field, even if we don't need it, because we *might* need it. |
| 109 | // If we are forcing no zip, we will have to error later if the file is too large. |
| 110 | let (lfh_compressed, lfh_uncompressed) = if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().writer.force_no_zip64rust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#force_no_zip64. { |
| 111 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().writer.is_zip64rust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#is_zip64. { |
| 112 | writer.is_zip64rust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#is_zip64. = true; |
| 113 | } |
| 114 | entry.extra_fieldsrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#extra_fields..pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(ExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/ExtraField#::Zip64ExtendedInformationrust-analyzer cargo async_zip 0.0.18 spec/header/ExtraField#Zip64ExtendedInformation#(Zip64ExtendedInformationExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField# { |
| 115 | header_idrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#header_id.: HeaderIdrust-analyzer cargo async_zip 0.0.18 spec/header/HeaderId#::ZIP64_EXTENDED_INFORMATION_EXTRA_FIELDrust-analyzer cargo async_zip 0.0.18 spec/header/impl#[HeaderId]ZIP64_EXTENDED_INFORMATION_EXTRA_FIELD., |
| 116 | uncompressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#uncompressed_size.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(entry.uncompressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#uncompressed_size.), |
| 117 | compressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#compressed_size.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(entry.compressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#compressed_size.), |
| 118 | relative_header_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#relative_header_offset.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 119 | disk_start_numberrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#disk_start_number.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 120 | })); |
| 121 | |
| 122 | (NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE., NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE.) |
| 123 | } else { |
| 124 | if entry.compressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#compressed_size. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE. as u64 || entry.uncompressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#uncompressed_size. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE. as u64 |
| 125 | { |
| 126 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(ZipErrorrust-analyzer cargo async_zip 0.0.18 error/ZipError#::Zip64Neededrust-analyzer cargo async_zip 0.0.18 error/ZipError#Zip64Needed#(Zip64ErrorCaserust-analyzer cargo async_zip 0.0.18 error/Zip64ErrorCase#::LargeFilerust-analyzer cargo async_zip 0.0.18 error/Zip64ErrorCase#LargeFile#)); |
| 127 | } |
| 128 | |
| 129 | (entry.compressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#compressed_size. as u32, entry.uncompressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#uncompressed_size. as u32) |
| 130 | }; |
| 131 | |
| 132 | let utf8_without_alternative = |
| 133 | entry.filenamerust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]filename().().is_utf8_without_alternativerust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]is_utf8_without_alternative().() && entry.commentrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]comment().().is_utf8_without_alternativerust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]is_utf8_without_alternative().(); |
| 134 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().utf8_without_alternative { |
| 135 | if matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(entry.filenamerust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]filename().().encodingrust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]encoding().(), StringEncodingrust-analyzer cargo async_zip 0.0.18 string/StringEncoding#::Utf8rust-analyzer cargo async_zip 0.0.18 string/StringEncoding#Utf8#) { |
| 136 | let u_file_name = entry.filenamerust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]filename().().as_bytesrust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]as_bytes().().to_vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]to_vec().(); |
| 137 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().u_file_name.is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]is_empty().() { |
| 138 | let basic_crc32 = |
| 139 | crc32fastrust-analyzer cargo crc32fast 1.4.2 crate/::hashrust-analyzer cargo crc32fast 1.4.2 hash().(entry.filenamerust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]filename().().alternativerust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]alternative().().unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| entry.filenamerust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]filename().().as_bytesrust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]as_bytes().())); |
| 140 | let upath_field = get_or_put_info_zip_unicode_path_extra_field_mutrust-analyzer cargo async_zip 0.0.18 base/write/get_or_put_info_zip_unicode_path_extra_field_mut().(entry.extra_fieldsrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#extra_fields..as_mutrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`AsMut<Self>`]as_mut().()); |
| 141 | if let InfoZipUnicodePathExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodePathExtraField#::V1rust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodePathExtraField#V1# { crc32rust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodePathExtraField#V1#crc32., unicoderust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodePathExtraField#V1#unicode. } = upath_field { |
| 142 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().crc32 = basic_crc32; |
| 143 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().unicode = u_file_name; |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | if matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(entry.commentrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]comment().().encodingrust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]encoding().(), StringEncodingrust-analyzer cargo async_zip 0.0.18 string/StringEncoding#::Utf8rust-analyzer cargo async_zip 0.0.18 string/StringEncoding#Utf8#) { |
| 148 | let u_comment = entry.commentrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]comment().().as_bytesrust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]as_bytes().().to_vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc slice/impl#[`[T]`]to_vec().(); |
| 149 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().u_comment.is_emptyrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]is_empty().() { |
| 150 | let basic_crc32 = |
| 151 | crc32fastrust-analyzer cargo crc32fast 1.4.2 crate/::hashrust-analyzer cargo crc32fast 1.4.2 hash().(entry.commentrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]comment().().alternativerust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]alternative().().unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| entry.commentrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]comment().().as_bytesrust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]as_bytes().())); |
| 152 | let ucom_field = get_or_put_info_zip_unicode_comment_extra_field_mutrust-analyzer cargo async_zip 0.0.18 base/write/get_or_put_info_zip_unicode_comment_extra_field_mut().(entry.extra_fieldsrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#extra_fields..as_mutrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`AsMut<Self>`]as_mut().()); |
| 153 | if let InfoZipUnicodeCommentExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodeCommentExtraField#::V1rust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodeCommentExtraField#V1# { crc32rust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodeCommentExtraField#V1#crc32., unicoderust-analyzer cargo async_zip 0.0.18 spec/header/InfoZipUnicodeCommentExtraField#V1#unicode. } = ucom_field { |
| 154 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().crc32 = basic_crc32; |
| 155 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().unicode = u_comment; |
| 156 | } |
| 157 | } |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | let filename_basic = entry.filenamerust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]filename().().alternativerust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]alternative().().unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| entry.filenamerust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]filename().().as_bytesrust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]as_bytes().()); |
| 162 | |
| 163 | let lfh = LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader# { |
| 164 | compressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#compressed_size.: lfh_compressed, |
| 165 | uncompressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#uncompressed_size.: lfh_uncompressed, |
| 166 | compressionrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#compression.: entry.compressionrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]compression().().intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(), |
| 167 | crcrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#crc.: entry.crc32rust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#crc32., |
| 168 | extra_field_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#extra_field_length.: entry |
| 169 | .extra_fieldsrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]extra_fields().() |
| 170 | .count_bytesrust-analyzer cargo async_zip 0.0.18 spec/extra_field/impl#[`&[ExtraField]`][ExtraFieldAsBytes]count_bytes().() |
| 171 | .try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`TryInto<U>`]try_into().() |
| 172 | .map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| ZipErrorrust-analyzer cargo async_zip 0.0.18 error/ZipError#::ExtraFieldTooLargerust-analyzer cargo async_zip 0.0.18 error/ZipError#ExtraFieldTooLarge#)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()., |
| 173 | file_name_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#file_name_length.: filename_basic.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().().try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`TryInto<U>`]try_into().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| ZipErrorrust-analyzer cargo async_zip 0.0.18 error/ZipError#::FileNameTooLargerust-analyzer cargo async_zip 0.0.18 error/ZipError#FileNameTooLarge#)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()., |
| 174 | mod_timerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#mod_time.: entry.last_modification_daterust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]last_modification_date().().timerust-analyzer cargo async_zip 0.0.18 date/ZipDateTime#time., |
| 175 | mod_daterust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#mod_date.: entry.last_modification_daterust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]last_modification_date().().daterust-analyzer cargo async_zip 0.0.18 date/ZipDateTime#date., |
| 176 | versionrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#version.: craterust-analyzer cargo async_zip 0.0.18 crate/::specrust-analyzer cargo async_zip 0.0.18 spec/::versionrust-analyzer cargo async_zip 0.0.18 spec/version/::as_needed_to_extractrust-analyzer cargo async_zip 0.0.18 spec/version/as_needed_to_extract().(entry), |
| 177 | flagsrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#flags.: GeneralPurposeFlagrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag# { |
| 178 | data_descriptorrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#data_descriptor.: true, |
| 179 | encryptedrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#encrypted.: false, |
| 180 | filename_unicoderust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#filename_unicode.: utf8_without_alternative, |
| 181 | }, |
| 182 | }; |
| 183 | |
| 184 | writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer..write_allrust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#write_all().(&craterust-analyzer cargo async_zip 0.0.18 crate/::specrust-analyzer cargo async_zip 0.0.18 spec/::constsrust-analyzer cargo async_zip 0.0.18 spec/consts/::LFH_SIGNATURErust-analyzer cargo async_zip 0.0.18 spec/consts/LFH_SIGNATURE..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 185 | writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer..write_allrust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#write_all().(&lfh.as_slicerust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[LocalFileHeader]as_slice().()).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 186 | writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer..write_allrust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#write_all().(filename_basic).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 187 | writer.writerrust-analyzer cargo async_zip 0.0.18 base/write/ZipFileWriter#writer..write_allrust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#write_all().(&entry.extra_fieldsrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]extra_fields().().as_bytesrust-analyzer cargo async_zip 0.0.18 spec/extra_field/impl#[`&[ExtraField]`][ExtraFieldAsBytes]as_bytes().()).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 188 | |
| 189 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(lfh) |
| 190 | } |
| 191 | |
| 192 | /// Consumes this entry writer and completes all closing tasks. |
| 193 | /// |
| 194 | /// This includes: |
| 195 | /// - Finalising the CRC32 hash value for the written data. |
| 196 | /// - Calculating the compressed and uncompressed byte sizes. |
| 197 | /// - Constructing a central directory header. |
| 198 | /// - Pushing that central directory header to the [`ZipFileWriter`]'s store. |
| 199 | /// |
| 200 | /// Failure to call this function before going out of scope would result in a corrupted ZIP file. |
| 201 | pub async fn closerust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'b, W>`]close().(mut self) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<()> { |
| 202 | self.writerrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#writer..closerust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#close().().rust-analyzer cargo futures-lite 2.1.0 io/impl#[`CloseFuture<'_, W>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`CloseFuture<'_, W>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 203 | |
| 204 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().self.precompressedrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#precompressed. { |
| 205 | self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..crc32rust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#crc32. = self.hasherrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#hasher..finalizerust-analyzer cargo crc32fast 1.4.2 impl#[Hasher]finalize().(); |
| 206 | self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..uncompressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#uncompressed_size. = self.writerrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#writer..offsetrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`]offset().(); |
| 207 | } |
| 208 | |
| 209 | let inner_writer = self.writerrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#writer..into_innerrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`]into_inner().().into_innerrust-analyzer cargo async_zip 0.0.18 base/write/compressed_writer/impl#[`CompressedAsyncWriter<'b, W>`]into_inner().(); |
| 210 | let compressed_size = inner_writer.offsetrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`]offset().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Sub<Self>`]sub().self.data_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#data_offset.; |
| 211 | |
| 212 | let (cdr_compressed_size, cdr_uncompressed_size, lh_offset) = if self.force_no_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#force_no_zip64. { |
| 213 | if self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..uncompressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#uncompressed_size. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE. as u64 |
| 214 | || compressed_size rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE. as u64 |
| 215 | || self.lfh_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh_offset. rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]gt().NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE. as u64 |
| 216 | { |
| 217 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(ZipErrorrust-analyzer cargo async_zip 0.0.18 error/ZipError#::Zip64Neededrust-analyzer cargo async_zip 0.0.18 error/ZipError#Zip64Needed#(Zip64ErrorCaserust-analyzer cargo async_zip 0.0.18 error/Zip64ErrorCase#::LargeFilerust-analyzer cargo async_zip 0.0.18 error/Zip64ErrorCase#LargeFile#)); |
| 218 | } |
| 219 | (self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..uncompressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#uncompressed_size. as u32, compressed_size as u32, self.lfh_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh_offset. as u32) |
| 220 | } else { |
| 221 | // When streaming an entry, we are always using a zip64 field. |
| 222 | match get_zip64_extra_field_mutrust-analyzer cargo async_zip 0.0.18 base/read/get_zip64_extra_field_mut().(&mut self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..extra_fieldsrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#extra_fields.) { |
| 223 | // This case shouldn't be necessary but is included for completeness. |
| 224 | Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None# => { |
| 225 | self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..extra_fieldsrust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#extra_fields..pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(ExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/ExtraField#::Zip64ExtendedInformationrust-analyzer cargo async_zip 0.0.18 spec/header/ExtraField#Zip64ExtendedInformation#( |
| 226 | Zip64ExtendedInformationExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField# { |
| 227 | header_idrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#header_id.: HeaderIdrust-analyzer cargo async_zip 0.0.18 spec/header/HeaderId#::ZIP64_EXTENDED_INFORMATION_EXTRA_FIELDrust-analyzer cargo async_zip 0.0.18 spec/header/impl#[HeaderId]ZIP64_EXTENDED_INFORMATION_EXTRA_FIELD., |
| 228 | uncompressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#uncompressed_size.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..uncompressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#uncompressed_size.), |
| 229 | compressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#compressed_size.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(compressed_size), |
| 230 | relative_header_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#relative_header_offset.: Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.lfh_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh_offset.), |
| 231 | disk_start_numberrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#disk_start_number.: Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#, |
| 232 | }, |
| 233 | )); |
| 234 | } |
| 235 | Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(zip64) => { |
| 236 | zip64.uncompressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#uncompressed_size. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..uncompressed_sizerust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#uncompressed_size.); |
| 237 | zip64.compressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#compressed_size. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(compressed_size); |
| 238 | zip64.relative_header_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64ExtendedInformationExtraField#relative_header_offset. = Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(self.lfh_offsetrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh_offset.); |
| 239 | } |
| 240 | } |
| 241 | self.lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh..extra_field_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#extra_field_length. = |
| 242 | self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..extra_fieldsrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]extra_fields().().count_bytesrust-analyzer cargo async_zip 0.0.18 spec/extra_field/impl#[`&[ExtraField]`][ExtraFieldAsBytes]count_bytes().().try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`TryInto<U>`]try_into().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| ZipErrorrust-analyzer cargo async_zip 0.0.18 error/ZipError#::ExtraFieldTooLargerust-analyzer cargo async_zip 0.0.18 error/ZipError#ExtraFieldTooLarge#)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 243 | |
| 244 | (NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE., NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE., NON_ZIP64_MAX_SIZErust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_SIZE.) |
| 245 | }; |
| 246 | |
| 247 | inner_writer.write_allrust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#write_all().(&craterust-analyzer cargo async_zip 0.0.18 crate/::specrust-analyzer cargo async_zip 0.0.18 spec/::constsrust-analyzer cargo async_zip 0.0.18 spec/consts/::DATA_DESCRIPTOR_SIGNATURErust-analyzer cargo async_zip 0.0.18 spec/consts/DATA_DESCRIPTOR_SIGNATURE..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 248 | inner_writer.write_allrust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#write_all().(&self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..crc32rust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#crc32..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 249 | inner_writer.write_allrust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#write_all().(&cdr_compressed_size.to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 250 | inner_writer.write_allrust-analyzer cargo futures-lite 2.1.0 io/AsyncWriteExt#write_all().(&cdr_uncompressed_size.to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`WriteAllFuture<'_, W>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 251 | |
| 252 | let comment_basic = self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..commentrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]comment().().alternativerust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]alternative().().unwrap_or_elserust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap_or_else().(|| self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..commentrust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]comment().().as_bytesrust-analyzer cargo async_zip 0.0.18 string/impl#[ZipString]as_bytes().()); |
| 253 | |
| 254 | let cdh = CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord# { |
| 255 | compressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#compressed_size.: cdr_compressed_size, |
| 256 | uncompressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#uncompressed_size.: cdr_uncompressed_size, |
| 257 | crcrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#crc.: self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..crc32rust-analyzer cargo async_zip 0.0.18 entry/ZipEntry#crc32., |
| 258 | v_made_byrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#v_made_by.: craterust-analyzer cargo async_zip 0.0.18 crate/::specrust-analyzer cargo async_zip 0.0.18 spec/::versionrust-analyzer cargo async_zip 0.0.18 spec/version/::as_made_byrust-analyzer cargo async_zip 0.0.18 spec/version/as_made_by().(), |
| 259 | v_neededrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#v_needed.: self.lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh..versionrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#version., |
| 260 | compressionrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#compression.: self.lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh..compressionrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#compression., |
| 261 | extra_field_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#extra_field_length.: self.lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh..extra_field_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#extra_field_length., |
| 262 | file_name_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#file_name_length.: self.lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh..file_name_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#file_name_length., |
| 263 | file_comment_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#file_comment_length.: comment_basic.lenrust-analyzer cargo core https://github.com/rust-lang/rust/library/core slice/impl#[`[T]`]len().().try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`TryInto<U>`]try_into().().map_errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]map_err().(|_| ZipErrorrust-analyzer cargo async_zip 0.0.18 error/ZipError#::CommentTooLargerust-analyzer cargo async_zip 0.0.18 error/ZipError#CommentTooLarge#)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()., |
| 264 | mod_timerust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#mod_time.: self.lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh..mod_timerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#mod_time., |
| 265 | mod_daterust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#mod_date.: self.lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh..mod_daterust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#mod_date., |
| 266 | flagsrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#flags.: self.lfhrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#lfh..flagsrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#flags., |
| 267 | disk_startrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#disk_start.: 0, |
| 268 | inter_attrrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#inter_attr.: self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..internal_file_attributerust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]internal_file_attribute().(), |
| 269 | exter_attrrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#exter_attr.: self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry..external_file_attributerust-analyzer cargo async_zip 0.0.18 entry/impl#[ZipEntry]external_file_attribute().(), |
| 270 | lh_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#lh_offset., |
| 271 | }; |
| 272 | |
| 273 | self.cd_entriesrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#cd_entries..pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(CentralDirectoryEntryrust-analyzer cargo async_zip 0.0.18 base/write/CentralDirectoryEntry# { headerrust-analyzer cargo async_zip 0.0.18 base/write/CentralDirectoryEntry#header.: cdh, entryrust-analyzer cargo async_zip 0.0.18 base/write/CentralDirectoryEntry#entry.: self.entryrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#entry. }); |
| 274 | // Ensure that we can fit this many files in this archive if forcing no zip64 |
| 275 | if self.cd_entriesrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#cd_entries..lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().>rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]gt().NON_ZIP64_MAX_NUM_FILESrust-analyzer cargo async_zip 0.0.18 spec/consts/NON_ZIP64_MAX_NUM_FILES. as usize { |
| 276 | if self.force_no_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#force_no_zip64. { |
| 277 | return Errrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Err#(ZipErrorrust-analyzer cargo async_zip 0.0.18 error/ZipError#::Zip64Neededrust-analyzer cargo async_zip 0.0.18 error/ZipError#Zip64Needed#(Zip64ErrorCaserust-analyzer cargo async_zip 0.0.18 error/Zip64ErrorCase#::TooManyFilesrust-analyzer cargo async_zip 0.0.18 error/Zip64ErrorCase#TooManyFiles#)); |
| 278 | } |
| 279 | if !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.is_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#is_zip64. { |
| 280 | *rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/deref/impl#[`&mut T`][Deref]deref().self.is_zip64rust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#is_zip64. = true; |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(()) |
| 285 | } |
| 286 | } |
| 287 | |
| 288 | impl<'a, W: AsyncWriterust-analyzer cargo futures-io 0.3.25 if_std/AsyncWrite# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#> AsyncWriterust-analyzer cargo futures-io 0.3.25 if_std/AsyncWrite# for EntryStreamWriterrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#<'a, W> { |
| 289 | fn poll_writerust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'a, W>`][AsyncWrite]poll_write().(mut self: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#<&mut Selfrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'a, W>`][AsyncWrite]>, cx: &mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#, buf: &[u8]) -> Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#<stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<usize, Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#>> { |
| 290 | let poll = Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<Ptr>`]new().(&mut self.writerrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#writer.).poll_writerust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`][AsyncWrite]poll_write().(cx, buf); |
| 291 | |
| 292 | if let Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#::Readyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#Ready#(Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(written)) = poll { |
| 293 | self.hasherrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#hasher..updaterust-analyzer cargo crc32fast 1.4.2 impl#[Hasher]update().(&buf[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#written]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/index/Index#index().); |
| 294 | } |
| 295 | |
| 296 | poll |
| 297 | } |
| 298 | |
| 299 | fn poll_flushrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'a, W>`][AsyncWrite]poll_flush().(mut self: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#<&mut Selfrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'a, W>`][AsyncWrite]>, cx: &mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#) -> Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#<stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#>> { |
| 300 | Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<Ptr>`]new().(&mut self.writerrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#writer.).poll_flushrust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`][AsyncWrite]poll_flush().(cx) |
| 301 | } |
| 302 | |
| 303 | fn poll_closerust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'a, W>`][AsyncWrite]poll_close().(mut self: Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#<&mut Selfrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/impl#[`EntryStreamWriter<'a, W>`][AsyncWrite]>, cx: &mut Contextrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/wake/Context#) -> Pollrust-analyzer cargo core https://github.com/rust-lang/rust/library/core task/poll/Poll#<stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/::Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo std https://github.com/rust-lang/rust/library/std io/error/Error#>> { |
| 304 | Pinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/Pin#::newrust-analyzer cargo core https://github.com/rust-lang/rust/library/core pin/impl#[`Pin<Ptr>`]new().(&mut self.writerrust-analyzer cargo async_zip 0.0.18 base/write/entry_stream/EntryStreamWriter#writer.).poll_closerust-analyzer cargo async_zip 0.0.18 base/write/io/offset/impl#[`AsyncOffsetWriter<W>`][AsyncWrite]poll_close().(cx) |
| 305 | } |
| 306 | } |