| 1 | // Copyright (c) 2022 Harry [Majored] [[email protected]] |
| 2 | // MIT License (https://github.com/Majored/rs-async-zip/blob/main/LICENSE) |
| 3 | |
| 4 | pub(craterust-analyzer cargo async_zip 0.0.18 crate/) mod builderrust-analyzer cargo async_zip 0.0.18 file/builder/; |
| 5 | |
| 6 | use craterust-analyzer cargo async_zip 0.0.18 crate/::{entryrust-analyzer cargo async_zip 0.0.18 entry/::StoredZipEntryrust-analyzer cargo async_zip 0.0.18 entry/StoredZipEntry#, stringrust-analyzer cargo async_zip 0.0.18 string/::ZipStringrust-analyzer cargo async_zip 0.0.18 string/ZipString#}; |
| 7 | use builderrust-analyzer cargo async_zip 0.0.18 file/builder/::ZipFileBuilderrust-analyzer cargo async_zip 0.0.18 file/builder/ZipFileBuilder#; |
| 8 | |
| 9 | /// An immutable store of data about a ZIP file. |
| 10 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 11 | pub struct ZipFilerust-analyzer cargo async_zip 0.0.18 file/ZipFile# { |
| 12 | pub(craterust-analyzer cargo async_zip 0.0.18 crate/) entriesrust-analyzer cargo async_zip 0.0.18 file/ZipFile#entries.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<StoredZipEntryrust-analyzer cargo async_zip 0.0.18 entry/StoredZipEntry#>, |
| 13 | pub(craterust-analyzer cargo async_zip 0.0.18 crate/) zip64rust-analyzer cargo async_zip 0.0.18 file/ZipFile#zip64.: bool, |
| 14 | pub(craterust-analyzer cargo async_zip 0.0.18 crate/) commentrust-analyzer cargo async_zip 0.0.18 file/ZipFile#comment.: ZipStringrust-analyzer cargo async_zip 0.0.18 string/ZipString#, |
| 15 | } |
| 16 | |
| 17 | impl Fromrust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/From#<ZipFileBuilderrust-analyzer cargo async_zip 0.0.18 file/builder/ZipFileBuilder#> for ZipFilerust-analyzer cargo async_zip 0.0.18 file/ZipFile# { |
| 18 | fn fromrust-analyzer cargo async_zip 0.0.18 file/impl#[ZipFile][`From<ZipFileBuilder>`]from().(builder: ZipFileBuilderrust-analyzer cargo async_zip 0.0.18 file/builder/ZipFileBuilder#) -> Selfrust-analyzer cargo async_zip 0.0.18 file/impl#[ZipFile][`From<ZipFileBuilder>`] { |
| 19 | builder.0rust-analyzer cargo async_zip 0.0.18 file/builder/ZipFileBuilder#0. |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | impl ZipFilerust-analyzer cargo async_zip 0.0.18 file/ZipFile# { |
| 24 | /// Returns a list of this ZIP file's entries. |
| 25 | pub fn entriesrust-analyzer cargo async_zip 0.0.18 file/impl#[ZipFile]entries().(&self) -> &[StoredZipEntryrust-analyzer cargo async_zip 0.0.18 entry/StoredZipEntry#] { |
| 26 | &self.entriesrust-analyzer cargo async_zip 0.0.18 file/ZipFile#entries. |
| 27 | } |
| 28 | |
| 29 | /// Returns this ZIP file's trailing comment. |
| 30 | pub fn commentrust-analyzer cargo async_zip 0.0.18 file/impl#[ZipFile]comment().(&self) -> &ZipStringrust-analyzer cargo async_zip 0.0.18 string/ZipString# { |
| 31 | &self.commentrust-analyzer cargo async_zip 0.0.18 file/ZipFile#comment. |
| 32 | } |
| 33 | |
| 34 | /// Returns whether or not this ZIP file is zip64 |
| 35 | pub fn zip64rust-analyzer cargo async_zip 0.0.18 file/impl#[ZipFile]zip64().(&self) -> bool { |
| 36 | self.zip64rust-analyzer cargo async_zip 0.0.18 file/ZipFile#zip64. |
| 37 | } |
| 38 | } |