#[non_exhaustive]pub struct Entry {
pub header: FileHeader,
pub name: Vec<u8>,
pub extra: Vec<u8>,
pub packed_range: Range<usize>,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.header: FileHeader§name: Vec<u8>§extra: Vec<u8>§packed_range: Range<usize>Implementations§
Source§impl Entry
impl Entry
pub fn name_bytes(&self) -> &[u8] ⓘ
Sourcepub fn name_lossy(&self) -> String
pub fn name_lossy(&self) -> String
Returns the entry name with invalid UTF-8 replaced for display only.
Use Self::name_bytes when exact archive bytes matter.
pub fn is_encrypted(&self) -> bool
pub fn is_split_before(&self) -> bool
pub fn is_split_after(&self) -> bool
pub fn is_directory(&self) -> bool
pub fn has_file_comment(&self) -> bool
pub fn file_comment(&self) -> Result<Option<Vec<u8>>>
pub fn is_stored(&self) -> bool
pub fn packed_data<'a>(&self, archive: &'a Archive) -> Result<&'a [u8]>
pub fn write_packed_data( &self, archive: &Archive, out: &mut impl Write, ) -> Result<()>
pub fn verify_checksum(&self, data: &[u8]) -> Result<()>
pub fn metadata(&self) -> ExtractedEntryMeta
pub fn write_to( &self, archive: &Archive, password: Option<&[u8]>, out: &mut impl Write, ) -> Result<()>
Trait Implementations§
impl Eq for Entry
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
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