Struct synthzip::LocalFileHeader
source · pub struct LocalFileHeader {Show 13 fields
pub signature: [u8; 4],
pub version_needed_to_extract: u16,
pub general_purpose_flags: u16,
pub compression_method: u16,
pub file_last_modification_time: u16,
pub file_last_modification_date: u16,
pub crc32_of_uncompressed_data: u32,
pub compressed_size: u32,
pub uncompressed_size: u32,
pub file_name_length: u16,
pub extra_field_length: u16,
pub file_name: String,
pub extra_field: Vec<u8>,
}
Fields§
§signature: [u8; 4]
§version_needed_to_extract: u16
§general_purpose_flags: u16
§compression_method: u16
§file_last_modification_time: u16
§file_last_modification_date: u16
§crc32_of_uncompressed_data: u32
§compressed_size: u32
§uncompressed_size: u32
§file_name_length: u16
§extra_field_length: u16
§file_name: String
§extra_field: Vec<u8>
Implementations§
source§impl LocalFileHeader
impl LocalFileHeader
pub fn has_valid_signature(&self) -> bool
pub fn validate_checksum(&self, uncompressed: &[u8]) -> bool
pub fn indicates_data_descriptor_is_present(&self) -> bool
pub fn update(&mut self, _: DataDescriptor) -> Result<()>
pub fn read<R: Read + Seek>(reader: &mut R) -> Result<Self>
pub fn write<W: Write + Seek>(&self, writer: &mut W) -> Result<()>
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 moresource§impl Debug for LocalFileHeader
impl Debug for LocalFileHeader
source§impl From<LocalFileHeader> for CentralDirectoryFileHeader
impl From<LocalFileHeader> for CentralDirectoryFileHeader
source§fn from(local_file_header: LocalFileHeader) -> Self
fn from(local_file_header: LocalFileHeader) -> Self
Converts to this type from the input type.
source§impl Hash for LocalFileHeader
impl Hash for LocalFileHeader
source§impl Ord for LocalFileHeader
impl Ord for LocalFileHeader
source§fn cmp(&self, other: &LocalFileHeader) -> Ordering
fn cmp(&self, other: &LocalFileHeader) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for LocalFileHeader
impl PartialEq for LocalFileHeader
source§fn eq(&self, other: &LocalFileHeader) -> bool
fn eq(&self, other: &LocalFileHeader) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for LocalFileHeader
impl PartialOrd for LocalFileHeader
source§fn partial_cmp(&self, other: &LocalFileHeader) -> Option<Ordering>
fn partial_cmp(&self, other: &LocalFileHeader) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for LocalFileHeader
impl StructuralEq for LocalFileHeader
impl StructuralPartialEq for LocalFileHeader
Auto 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