| 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/::errorrust-analyzer cargo async_zip 0.0.18 error/::{Resultrust-analyzer cargo async_zip 0.0.18 error/Result#, ZipErrorrust-analyzer cargo async_zip 0.0.18 error/ZipError#}; |
| 5 | 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/::{ |
| 6 | CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#, EndOfCentralDirectoryHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#, 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#, |
| 7 | Zip64EndOfCentralDirectoryLocatorrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#, Zip64EndOfCentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#, |
| 8 | }; |
| 9 | |
| 10 | use futures_literust-analyzer cargo futures-lite 2.1.0 crate/::iorust-analyzer cargo futures-lite 2.1.0 io/::{AsyncReadrust-analyzer cargo futures-io 0.3.25 if_std/AsyncRead#, AsyncReadExtrust-analyzer cargo futures-lite 2.1.0 io/AsyncReadExt#}; |
| 11 | |
| 12 | impl LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader# { |
| 13 | pub fn as_slicerust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[LocalFileHeader]as_slice().(&self) -> [u8; 26] { |
| 14 | let mut array = [0; 26]; |
| 15 | let mut cursor = 0; |
| 16 | |
| 17 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.versionrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#version..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 18 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.flagsrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#flags..as_slicerust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[GeneralPurposeFlag]as_slice().()); |
| 19 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.compressionrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#compression..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 20 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.mod_timerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#mod_time..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 21 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.mod_daterust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#mod_date..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 22 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.crcrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#crc..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 23 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.compressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#compressed_size..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 24 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.uncompressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#uncompressed_size..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 25 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.file_name_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#file_name_length..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 26 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.extra_field_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#extra_field_length..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 27 | |
| 28 | array |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | impl GeneralPurposeFlagrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag# { |
| 33 | pub fn as_slicerust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[GeneralPurposeFlag]as_slice().(&self) -> [u8; 2] { |
| 34 | let encrypted: u16 = match self.encryptedrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#encrypted. { |
| 35 | false => 0x0, |
| 36 | true => 0b1, |
| 37 | }; |
| 38 | let data_descriptor: u16 = match self.data_descriptorrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#data_descriptor. { |
| 39 | false => 0x0, |
| 40 | true => 0x8, |
| 41 | }; |
| 42 | let filename_unicode: u16 = match self.filename_unicoderust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#filename_unicode. { |
| 43 | false => 0x0, |
| 44 | true => 0x800, |
| 45 | }; |
| 46 | |
| 47 | (encrypted rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitOr<Self>`]bitor().data_descriptor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitOr<Self>`]bitor().|rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitOr<Self>`]bitor(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitOr<Self>`]bitor().filename_unicode).to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().() |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | impl CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord# { |
| 52 | pub fn as_slicerust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[CentralDirectoryRecord]as_slice().(&self) -> [u8; 42] { |
| 53 | let mut array = [0; 42]; |
| 54 | let mut cursor = 0; |
| 55 | |
| 56 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.v_made_byrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#v_made_by..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 57 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.v_neededrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#v_needed..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 58 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.flagsrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#flags..as_slicerust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[GeneralPurposeFlag]as_slice().()); |
| 59 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.compressionrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#compression..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 60 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.mod_timerust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#mod_time..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 61 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.mod_daterust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#mod_date..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 62 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.crcrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#crc..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 63 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.compressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#compressed_size..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 64 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.uncompressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#uncompressed_size..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 65 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.file_name_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#file_name_length..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 66 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.extra_field_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#extra_field_length..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 67 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.file_comment_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#file_comment_length..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 68 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.disk_startrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#disk_start..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 69 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.inter_attrrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#inter_attr..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 70 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.exter_attrrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#exter_attr..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 71 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.lh_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#lh_offset..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 72 | |
| 73 | array |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | impl EndOfCentralDirectoryHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader# { |
| 78 | pub fn as_slicerust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[EndOfCentralDirectoryHeader]as_slice().(&self) -> [u8; 18] { |
| 79 | let mut array = [0; 18]; |
| 80 | let mut cursor = 0; |
| 81 | |
| 82 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.disk_numrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#disk_num..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 83 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.start_cent_dir_diskrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#start_cent_dir_disk..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 84 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.num_of_entries_diskrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#num_of_entries_disk..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 85 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.num_of_entriesrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#num_of_entries..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 86 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.size_cent_dirrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#size_cent_dir..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 87 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.cent_dir_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#cent_dir_offset..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 88 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.file_comm_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#file_comm_length..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 89 | |
| 90 | array |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<[u8; 26]> for LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader# { |
| 95 | fn fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[LocalFileHeader][`From<[u8; 26]>`]from().(value: [u8; 26]) -> LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader# { |
| 96 | LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader# { |
| 97 | versionrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#version.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 98 | flagsrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#flags.: GeneralPurposeFlagrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#::fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[GeneralPurposeFlag][`From<u16>`]from().(u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().())), |
| 99 | compressionrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#compression.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 100 | mod_timerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#mod_time.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().6..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 101 | mod_daterust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#mod_date.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().8..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#10]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 102 | crcrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#crc.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().10..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#14]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 103 | compressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#compressed_size.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().14..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#18]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 104 | uncompressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#uncompressed_size.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().18..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#22]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 105 | file_name_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#file_name_length.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().22..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#24]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 106 | extra_field_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#extra_field_length.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().24..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#26]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 107 | } |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<u16> for GeneralPurposeFlagrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag# { |
| 112 | fn fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[GeneralPurposeFlag][`From<u16>`]from().(value: u16) -> GeneralPurposeFlagrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag# { |
| 113 | let encrypted = !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!(value &rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitAnd<Self>`]bitand(). 0x1, 0); |
| 114 | let data_descriptor = !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!((value &rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitAnd<Self>`]bitand(). 0x8) >> 3, 0); |
| 115 | let filename_unicode = !rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[bool][Not]not().matchesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/matches!!((value &rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/bit/impl#[u16][`BitAnd<Self>`]bitand(). 0x800) >> 11, 0); |
| 116 | |
| 117 | GeneralPurposeFlagrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag# { encryptedrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#encrypted., data_descriptorrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#data_descriptor., filename_unicoderust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#filename_unicode. } |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<[u8; 42]> for CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord# { |
| 122 | fn fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[CentralDirectoryRecord][`From<[u8; 42]>`]from().(value: [u8; 42]) -> CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord# { |
| 123 | CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord# { |
| 124 | v_made_byrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#v_made_by.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 125 | v_neededrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#v_needed.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 126 | flagsrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#flags.: GeneralPurposeFlagrust-analyzer cargo async_zip 0.0.18 spec/header/GeneralPurposeFlag#::fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[GeneralPurposeFlag][`From<u16>`]from().(u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().())), |
| 127 | compressionrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#compression.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().6..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 128 | mod_timerust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#mod_time.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().8..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#10]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 129 | mod_daterust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#mod_date.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().10..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 130 | crcrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#crc.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().12..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#16]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 131 | compressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#compressed_size.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().16..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#20]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 132 | uncompressed_sizerust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#uncompressed_size.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().20..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#24]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 133 | file_name_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#file_name_length.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().24..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#26]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 134 | extra_field_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#extra_field_length.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().26..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#28]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 135 | file_comment_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#file_comment_length.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().28..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#30]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 136 | disk_startrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#disk_start.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().30..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#32]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 137 | inter_attrrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#inter_attr.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().32..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#34]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 138 | exter_attrrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#exter_attr.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().34..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#38]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 139 | lh_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#lh_offset.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().38..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#42]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 140 | } |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<[u8; 18]> for EndOfCentralDirectoryHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader# { |
| 145 | fn fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[EndOfCentralDirectoryHeader][`From<[u8; 18]>`]from().(value: [u8; 18]) -> EndOfCentralDirectoryHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader# { |
| 146 | EndOfCentralDirectoryHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader# { |
| 147 | disk_numrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#disk_num.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#2]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 148 | start_cent_dir_diskrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#start_cent_dir_disk.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().2..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 149 | num_of_entries_diskrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#num_of_entries_disk.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#6]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 150 | num_of_entriesrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#num_of_entries.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().6..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 151 | size_cent_dirrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#size_cent_dir.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().8..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 152 | cent_dir_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#cent_dir_offset.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().12..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#16]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 153 | file_comm_lengthrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#file_comm_length.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().16..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#18]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 154 | } |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<[u8; 52]> for Zip64EndOfCentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord# { |
| 159 | fn fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryRecord][`From<[u8; 52]>`]from().(value: [u8; 52]) -> Selfrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryRecord][`From<[u8; 52]>`] { |
| 160 | Selfrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryRecord][`From<[u8; 52]>`] { |
| 161 | size_of_zip64_end_of_cd_recordrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#size_of_zip64_end_of_cd_record.: u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#8]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 162 | version_made_byrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#version_made_by.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().8..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#10]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 163 | version_needed_to_extractrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#version_needed_to_extract.: u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().10..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 164 | disk_numberrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#disk_number.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().12..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#16]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 165 | disk_number_start_of_cdrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#disk_number_start_of_cd.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().16..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#20]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 166 | num_entries_in_directory_on_diskrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#num_entries_in_directory_on_disk.: u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().20..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#28]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 167 | num_entries_in_directoryrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#num_entries_in_directory.: u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().28..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#36]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 168 | directory_sizerust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#directory_size.: u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().36..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#44]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 169 | offset_of_start_of_directoryrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#offset_of_start_of_directory.: u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().44..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#52]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 170 | } |
| 171 | } |
| 172 | } |
| 173 | |
| 174 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<[u8; 16]> for Zip64EndOfCentralDirectoryLocatorrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator# { |
| 175 | fn fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryLocator][`From<[u8; 16]>`]from().(value: [u8; 16]) -> Selfrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryLocator][`From<[u8; 16]>`] { |
| 176 | Selfrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryLocator][`From<[u8; 16]>`] { |
| 177 | number_of_disk_with_start_of_zip64_end_of_central_directoryrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#number_of_disk_with_start_of_zip64_end_of_central_directory.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().( |
| 178 | value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().0..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#4]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), |
| 179 | ), |
| 180 | relative_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#relative_offset.: u64::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#12]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 181 | total_number_of_disksrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#total_number_of_disks.: u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(value[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().12..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#16]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()), |
| 182 | } |
| 183 | } |
| 184 | } |
| 185 | |
| 186 | impl LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader# { |
| 187 | pub async fn from_readerrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[LocalFileHeader]from_reader().<R: AsyncReadrust-analyzer cargo futures-io 0.3.25 if_std/AsyncRead# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#>(reader: &mut R) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#> { |
| 188 | let mut buffer: [u8; 26] = [0; 26]; |
| 189 | reader.read_exactrust-analyzer cargo futures-lite 2.1.0 io/AsyncReadExt#read_exact().(&mut buffer).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 190 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(LocalFileHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/LocalFileHeader#::fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[LocalFileHeader][`From<[u8; 26]>`]from().(buffer)) |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | impl EndOfCentralDirectoryHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader# { |
| 195 | pub async fn from_readerrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[EndOfCentralDirectoryHeader]from_reader().<R: AsyncReadrust-analyzer cargo futures-io 0.3.25 if_std/AsyncRead# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#>(reader: &mut R) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<EndOfCentralDirectoryHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#> { |
| 196 | let mut buffer: [u8; 18] = [0; 18]; |
| 197 | reader.read_exactrust-analyzer cargo futures-lite 2.1.0 io/AsyncReadExt#read_exact().(&mut buffer).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 198 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(EndOfCentralDirectoryHeaderrust-analyzer cargo async_zip 0.0.18 spec/header/EndOfCentralDirectoryHeader#::fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[EndOfCentralDirectoryHeader][`From<[u8; 18]>`]from().(buffer)) |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | impl CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord# { |
| 203 | pub async fn from_readerrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[CentralDirectoryRecord]from_reader().<R: AsyncReadrust-analyzer cargo futures-io 0.3.25 if_std/AsyncRead# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#>(reader: &mut R) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#> { |
| 204 | let mut buffer: [u8; 42] = [0; 42]; |
| 205 | reader.read_exactrust-analyzer cargo futures-lite 2.1.0 io/AsyncReadExt#read_exact().(&mut buffer).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 206 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(CentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/CentralDirectoryRecord#::fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[CentralDirectoryRecord][`From<[u8; 42]>`]from().(buffer)) |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | impl Zip64EndOfCentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord# { |
| 211 | pub async fn from_readerrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryRecord]from_reader().<R: AsyncReadrust-analyzer cargo futures-io 0.3.25 if_std/AsyncRead# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#>(reader: &mut R) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<Zip64EndOfCentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#> { |
| 212 | let mut buffer: [u8; 52] = [0; 52]; |
| 213 | reader.read_exactrust-analyzer cargo futures-lite 2.1.0 io/AsyncReadExt#read_exact().(&mut buffer).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 214 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Selfrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryRecord]::fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryRecord][`From<[u8; 52]>`]from().(buffer)) |
| 215 | } |
| 216 | |
| 217 | pub fn as_bytesrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryRecord]as_bytes().(&self) -> [u8; 52] { |
| 218 | let mut array = [0; 52]; |
| 219 | let mut cursor = 0; |
| 220 | |
| 221 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.size_of_zip64_end_of_cd_recordrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#size_of_zip64_end_of_cd_record..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]to_le_bytes().()); |
| 222 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.version_made_byrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#version_made_by..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 223 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.version_needed_to_extractrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#version_needed_to_extract..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]to_le_bytes().()); |
| 224 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.disk_numberrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#disk_number..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 225 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.disk_number_start_of_cdrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#disk_number_start_of_cd..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 226 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.num_entries_in_directory_on_diskrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#num_entries_in_directory_on_disk..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]to_le_bytes().()); |
| 227 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.num_entries_in_directoryrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#num_entries_in_directory..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]to_le_bytes().()); |
| 228 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.directory_sizerust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#directory_size..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]to_le_bytes().()); |
| 229 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.offset_of_start_of_directoryrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#offset_of_start_of_directory..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]to_le_bytes().()); |
| 230 | |
| 231 | array |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | impl Zip64EndOfCentralDirectoryLocatorrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator# { |
| 236 | /// Read 4 bytes from the reader and check whether its signature matches that of the EOCDL. |
| 237 | /// If it does, return Some(EOCDL), otherwise return None. |
| 238 | pub async fn try_from_readerrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryLocator]try_from_reader().<R: AsyncReadrust-analyzer cargo futures-io 0.3.25 if_std/AsyncRead# + Unpinrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Unpin#>( |
| 239 | reader: &mut R, |
| 240 | ) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Zip64EndOfCentralDirectoryLocatorrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#>> { |
| 241 | let signature = { |
| 242 | let mut buffer = [0; 4]; |
| 243 | reader.read_exactrust-analyzer cargo futures-lite 2.1.0 io/AsyncReadExt#read_exact().(&mut buffer).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 244 | u32::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]from_le_bytes().(buffer) |
| 245 | }; |
| 246 | if signature rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().!=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u32][`PartialEq<Self>`]ne().ZIP64_EOCDL_SIGNATURErust-analyzer cargo async_zip 0.0.18 spec/consts/ZIP64_EOCDL_SIGNATURE. { |
| 247 | return Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Nonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#None#); |
| 248 | } |
| 249 | let mut buffer: [u8; 16] = [0; 16]; |
| 250 | reader.read_exactrust-analyzer cargo futures-lite 2.1.0 io/AsyncReadExt#read_exact().(&mut buffer).rust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().awaitrust-analyzer cargo futures-lite 2.1.0 io/impl#[`ReadExactFuture<'_, R>`][Future]poll().?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().; |
| 251 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(Somerust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#Some#(Selfrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryLocator]::fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryLocator][`From<[u8; 16]>`]from().(buffer))) |
| 252 | } |
| 253 | |
| 254 | pub fn as_bytesrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryLocator]as_bytes().(&self) -> [u8; 16] { |
| 255 | let mut array = [0; 16]; |
| 256 | let mut cursor = 0; |
| 257 | |
| 258 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.number_of_disk_with_start_of_zip64_end_of_central_directoryrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#number_of_disk_with_start_of_zip64_end_of_central_directory..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 259 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.relative_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#relative_offset..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u64]to_le_bytes().()); |
| 260 | array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!!(array, cursor, self.total_number_of_disksrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#total_number_of_disks..to_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u32]to_le_bytes().()); |
| 261 | |
| 262 | array |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | /// Parse the extra fields. |
| 267 | pub fn parse_extra_fieldsrust-analyzer cargo async_zip 0.0.18 spec/parse/parse_extra_fields().(data: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<u8>, uncompressed_size: u32, compressed_size: u32) -> Resultrust-analyzer cargo async_zip 0.0.18 error/Result#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<ExtraFieldrust-analyzer cargo async_zip 0.0.18 spec/header/ExtraField#>> { |
| 268 | let mut cursor = 0; |
| 269 | let mut extra_fields = Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`]new().(); |
| 270 | while cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[usize][`PartialOrd<Self>`]lt().data.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() { |
| 271 | let header_id: HeaderIdrust-analyzer cargo async_zip 0.0.18 spec/header/HeaderId# = u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(data[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().cursor..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().2]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()).intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().(); |
| 272 | let field_size = u16::from_le_bytesrust-analyzer cargo core https://github.com/rust-lang/rust/library/core num/impl#[u16]from_le_bytes().(data[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().2..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().4]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/TryInto#try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().()); |
| 273 | if cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().field_size as usize 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().data.lenrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]len().() { |
| 274 | 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#::InvalidExtraFieldHeaderrust-analyzer cargo async_zip 0.0.18 error/ZipError#InvalidExtraFieldHeader#(field_size, data.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 ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().8 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().-rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Sub<Self>`]sub().field_size as usize)); |
| 275 | } |
| 276 | let data = &data[rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().4..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().field_size as usize]rust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`][`Index<I>`]index().; |
| 277 | extra_fields.pushrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T, A>`]push().(extra_field_from_bytesrust-analyzer cargo async_zip 0.0.18 spec/extra_field/extra_field_from_bytes().(header_id, field_size, data, uncompressed_size, compressed_size)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().); |
| 278 | cursor rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().+=rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`AddAssign<Self>`]add_assign().4 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().+rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[usize][`Add<Self>`]add().field_size as usize; |
| 279 | } |
| 280 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(extra_fields) |
| 281 | } |
| 282 | |
| 283 | /// Replace elements of an array at a given cursor index for use with a zero-initialised array. |
| 284 | macro_rules! array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push! { |
| 285 | ($arr:ident, $cursor:ident, $value:expr) => {{ |
| 286 | for entry in $value { |
| 287 | $arr[$cursor] = entry; |
| 288 | $cursor += 1; |
| 289 | } |
| 290 | }}; |
| 291 | } |
| 292 | |
| 293 | 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/::ZIP64_EOCDL_SIGNATURErust-analyzer cargo async_zip 0.0.18 spec/consts/ZIP64_EOCDL_SIGNATURE.; |
| 294 | 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/::extra_field_from_bytesrust-analyzer cargo async_zip 0.0.18 spec/extra_field/extra_field_from_bytes().; |
| 295 | pub(craterust-analyzer cargo async_zip 0.0.18 crate/) use array_pushrust-analyzer cargo async_zip 0.0.18 spec/parse/array_push!; |
| 296 | |
| 297 | #[cfg(test)] |
| 298 | mod testsrust-analyzer cargo async_zip 0.0.18 spec/parse/tests/ { |
| 299 | use superrust-analyzer cargo async_zip 0.0.18 spec/parse/::*; |
| 300 | |
| 301 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 302 | fn test_parse_zip64_eocdrrust-analyzer cargo async_zip 0.0.18 spec/parse/tests/test_parse_zip64_eocdr().() { |
| 303 | let eocdr: [u8; 56] = [ |
| 304 | 0x50, 0x4B, 0x06, 0x06, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x03, 0x2D, 0x00, 0x00, 0x00, |
| 305 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, |
| 306 | 0x00, 0x00, 0x00, 0x00, 0x2F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 307 | 0x00, 0x00, |
| 308 | ]; |
| 309 | |
| 310 | let without_signature: [u8; 52] = eocdr[rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().4..rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/Range#56]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()..try_intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`TryInto<U>`]try_into().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(); |
| 311 | let zip64eocdr = Zip64EndOfCentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#::fromrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryRecord][`From<[u8; 52]>`]from().(without_signature); |
| 312 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 313 | zip64eocdr, |
| 314 | Zip64EndOfCentralDirectoryRecordrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord# { |
| 315 | size_of_zip64_end_of_cd_recordrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#size_of_zip64_end_of_cd_record.: 44, |
| 316 | version_made_byrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#version_made_by.: 798, |
| 317 | version_needed_to_extractrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#version_needed_to_extract.: 45, |
| 318 | disk_numberrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#disk_number.: 0, |
| 319 | disk_number_start_of_cdrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#disk_number_start_of_cd.: 0, |
| 320 | num_entries_in_directory_on_diskrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#num_entries_in_directory_on_disk.: 1, |
| 321 | num_entries_in_directoryrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#num_entries_in_directory.: 1, |
| 322 | directory_sizerust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#directory_size.: 47, |
| 323 | offset_of_start_of_directoryrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryRecord#offset_of_start_of_directory.: 64, |
| 324 | } |
| 325 | ) |
| 326 | } |
| 327 | |
| 328 | #[tokiorust-analyzer cargo tokio 1.25.0 crate/::testrust-analyzer cargo tokio-macros 1.8.0 test:] |
| 329 | async fn test_parse_zip64_eocdlrust-analyzer cargo async_zip 0.0.18 spec/parse/tests/test_parse_zip64_eocdl().() { |
| 330 | let eocdl: [u8; 20] = [ |
| 331 | 0x50, 0x4B, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, |
| 332 | 0x00, 0x00, |
| 333 | ]; |
| 334 | let mut cursor = futures_literust-analyzer cargo futures-lite 2.1.0 crate/::iorust-analyzer cargo futures-lite 2.1.0 io/::Cursorrust-analyzer cargo futures-lite 2.1.0 io/Cursor#::newrust-analyzer cargo futures-lite 2.1.0 io/impl#[`Cursor<T>`]new().(eocdl); |
| 335 | let zip64eocdl = Zip64EndOfCentralDirectoryLocatorrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#::try_from_readerrust-analyzer cargo async_zip 0.0.18 spec/parse/impl#[Zip64EndOfCentralDirectoryLocator]try_from_reader().(&mut cursor).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()..unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().().unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`]unwrap().(); |
| 336 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!( |
| 337 | zip64eocdl, |
| 338 | Zip64EndOfCentralDirectoryLocatorrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator# { |
| 339 | number_of_disk_with_start_of_zip64_end_of_central_directoryrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#number_of_disk_with_start_of_zip64_end_of_central_directory.: 0, |
| 340 | relative_offsetrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#relative_offset.: 111, |
| 341 | total_number_of_disksrust-analyzer cargo async_zip 0.0.18 spec/header/Zip64EndOfCentralDirectoryLocator#total_number_of_disks.: 1, |
| 342 | } |
| 343 | ) |
| 344 | } |
| 345 | } |