pub struct LocalFileHeader {
pub version: u16,
pub flag: u16,
pub compression_method: Option<CompressionMethod>,
pub mod_time: u16,
pub mod_date: u16,
pub crc32: u32,
pub compressed_size: u64,
pub uncompressed_size: u64,
pub filename: String,
pub extra_fields: Vec<FileHeaderExtraField>,
pub header_size: usize,
}Expand description
Represents the result of reading a ZIP local file header (LFH)
The layout of this object does not follow the original ZIP LFH structure
Fields§
§version: u16§flag: u16§compression_method: Option<CompressionMethod>§mod_time: u16§mod_date: u16§crc32: u32§compressed_size: u64§uncompressed_size: u64§filename: String§extra_fields: Vec<FileHeaderExtraField>§header_size: usizeImplementations§
Source§impl LocalFileHeader
impl LocalFileHeader
Sourcepub fn from_bytes(data: impl AsRef<[u8]>) -> Option<Self>
pub fn from_bytes(data: impl AsRef<[u8]>) -> Option<Self>
Attempts to read a local file header from the provided byte buffer. Returns None if there isn’t enought data
pub fn is_directory(&self) -> bool
Trait Implementations§
Source§impl Clone for LocalFileHeader
impl Clone for LocalFileHeader
Source§fn clone(&self) -> LocalFileHeader
fn clone(&self) -> LocalFileHeader
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LocalFileHeader
impl RefUnwindSafe for LocalFileHeader
impl Send for LocalFileHeader
impl Sync for LocalFileHeader
impl Unpin for LocalFileHeader
impl UnwindSafe for LocalFileHeader
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