Struct rc_zip::parse::CentralDirectoryFileHeader
source · pub struct CentralDirectoryFileHeader<'a> {Show 15 fields
pub creator_version: Version,
pub reader_version: Version,
pub flags: u16,
pub method: Method,
pub modified: MsdosTimestamp,
pub crc32: u32,
pub compressed_size: u32,
pub uncompressed_size: u32,
pub disk_nbr_start: u16,
pub internal_attrs: u16,
pub external_attrs: u32,
pub header_offset: u32,
pub name: Cow<'a, [u8]>,
pub extra: Cow<'a, [u8]>,
pub comment: Cow<'a, [u8]>,
}
Expand description
4.3.12 Central directory structure: File header
Fields§
§creator_version: Version
version made by
reader_version: Version
version needed to extract
flags: u16
general purpose bit flag
method: Method
compression method
modified: MsdosTimestamp
last mod file datetime
crc32: u32
crc32 hash
compressed_size: u32
compressed size
uncompressed_size: u32
uncompressed size
disk_nbr_start: u16
disk number start
internal_attrs: u16
internal file attributes
external_attrs: u32
external file attributes
header_offset: u32
relative offset of local header
name: Cow<'a, [u8]>
name field
extra: Cow<'a, [u8]>
extra field
comment: Cow<'a, [u8]>
comment field
Implementations§
source§impl CentralDirectoryFileHeader<'_>
impl CentralDirectoryFileHeader<'_>
sourcepub fn into_owned(self) -> CentralDirectoryFileHeader<'static>
pub fn into_owned(self) -> CentralDirectoryFileHeader<'static>
Copy the structure and clone the original values if it’s not owned.
This is always a deep copy of the structure.
source§impl CentralDirectoryFileHeader<'_>
impl CentralDirectoryFileHeader<'_>
sourcepub fn to_owned(&self) -> CentralDirectoryFileHeader<'static>
pub fn to_owned(&self) -> CentralDirectoryFileHeader<'static>
Copy the structure and clone the original values.
This is always a deep copy.
source§impl<'a> CentralDirectoryFileHeader<'a>
impl<'a> CentralDirectoryFileHeader<'a>
source§impl CentralDirectoryFileHeader<'_>
impl CentralDirectoryFileHeader<'_>
sourcepub fn is_non_utf8(&self) -> bool
pub fn is_non_utf8(&self) -> bool
Returns true if the name or comment is not valid UTF-8
Trait Implementations§
source§impl IntoOwned for CentralDirectoryFileHeader<'_>
impl IntoOwned for CentralDirectoryFileHeader<'_>
source§type Owned = CentralDirectoryFileHeader<'static>
type Owned = CentralDirectoryFileHeader<'static>
The type after obtaining ownership, should be the same as before but with static lifetime.
source§fn into_owned(self) -> Self::Owned
fn into_owned(self) -> Self::Owned
Copy the structure and clone the original values if it’s not owned. Read more
Auto Trait Implementations§
impl<'a> Freeze for CentralDirectoryFileHeader<'a>
impl<'a> RefUnwindSafe for CentralDirectoryFileHeader<'a>
impl<'a> Send for CentralDirectoryFileHeader<'a>
impl<'a> Sync for CentralDirectoryFileHeader<'a>
impl<'a> Unpin for CentralDirectoryFileHeader<'a>
impl<'a> UnwindSafe for CentralDirectoryFileHeader<'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