pub struct ZipFileReader { /* private fields */ }Implementations§
Source§impl ZipFileReader
impl ZipFileReader
Sourcepub async fn new(data: Vec<u8>) -> Result<ZipFileReader>
pub async fn new(data: Vec<u8>) -> Result<ZipFileReader>
Constructs a new ZIP reader from an owned vector of bytes.
Sourcepub fn from_raw_parts(data: Vec<u8>, file: ZipFile) -> ZipFileReader
pub fn from_raw_parts(data: Vec<u8>, file: ZipFile) -> ZipFileReader
Constructs a ZIP reader from an owned vector of bytes and ZIP file information derived from those bytes.
Providing a ZipFile that wasn’t derived from those bytes may lead to inaccurate parsing.
Sourcepub fn data(&self) -> &[u8] ⓘ
pub fn data(&self) -> &[u8] ⓘ
Returns the raw bytes provided to the reader during construction.
Sourcepub async fn reader_without_entry(
&self,
index: usize,
) -> Result<ZipEntryReader<'_, Cursor<&[u8]>, WithoutEntry>>
pub async fn reader_without_entry( &self, index: usize, ) -> Result<ZipEntryReader<'_, Cursor<&[u8]>, WithoutEntry>>
Returns a new entry reader if the provided index is valid.
Sourcepub async fn reader_with_entry(
&self,
index: usize,
) -> Result<ZipEntryReader<'_, Cursor<&[u8]>, WithEntry<'_>>>
pub async fn reader_with_entry( &self, index: usize, ) -> Result<ZipEntryReader<'_, Cursor<&[u8]>, WithEntry<'_>>>
Returns a new entry reader if the provided index is valid.
Trait Implementations§
Source§impl Clone for ZipFileReader
impl Clone for ZipFileReader
Source§fn clone(&self) -> ZipFileReader
fn clone(&self) -> ZipFileReader
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 ZipFileReader
impl RefUnwindSafe for ZipFileReader
impl Send for ZipFileReader
impl Sync for ZipFileReader
impl Unpin for ZipFileReader
impl UnwindSafe for ZipFileReader
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