pub struct ZipEntry<'a> { /* private fields */ }Expand description
One central directory entry: the authoritative record of a member of the archive.
Implementations§
Source§impl<'a> ZipEntry<'a>
impl<'a> ZipEntry<'a>
Sourcepub fn name(&self) -> &'a str
pub fn name(&self) -> &'a str
The member name as stored in the central directory. Archives whose
names are not valid UTF-8 are rejected at
ZipArchive::new; the suite only feeds it names it typed.
Sourcepub fn method(&self) -> u16
pub fn method(&self) -> u16
The compression method: 0 (stored) or 8 (DEFLATE). Other
methods parse fine and refuse at extraction with
Error::Unsupported.
Sourcepub fn compressed_size(&self) -> u64
pub fn compressed_size(&self) -> u64
Payload length on disk, in bytes.
Sourcepub fn uncompressed_size(&self) -> u64
pub fn uncompressed_size(&self) -> u64
Expected decompressed length, in bytes. Verification compares the produced byte count against this before the CRC is checked.
Sourcepub fn uses_data_descriptor(&self) -> bool
pub fn uses_data_descriptor(&self) -> bool
Whether this entry carries a data descriptor (flags bit 3): the local header’s CRC and size fields are zero and the real values trail the payload.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ZipEntry<'a>
impl<'a> RefUnwindSafe for ZipEntry<'a>
impl<'a> Send for ZipEntry<'a>
impl<'a> Sync for ZipEntry<'a>
impl<'a> Unpin for ZipEntry<'a>
impl<'a> UnsafeUnpin for ZipEntry<'a>
impl<'a> UnwindSafe for ZipEntry<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more