Struct stream_unpack::zip::structures::local_file_header::LocalFileHeader
source · 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 copy 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 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