pub struct ZipFileReader { /* private fields */ }Available on crate features
tokio and tokio-fs only.Expand description
A concurrent ZIP reader which acts over a file system path.
Implementations§
Source§impl ZipFileReader
impl ZipFileReader
Sourcepub async fn new<P>(path: P) -> Result<ZipFileReader>
pub async fn new<P>(path: P) -> Result<ZipFileReader>
Constructs a new ZIP reader from a file system path.
Sourcepub fn from_raw_parts<P>(path: P, file: ZipFile) -> ZipFileReader
pub fn from_raw_parts<P>(path: P, file: ZipFile) -> ZipFileReader
Constructs a ZIP reader from a file system path and ZIP file information derived from that path.
Providing a ZipFile that wasn’t derived from that path may lead to inaccurate parsing.
Sourcepub fn path(&self) -> &Path
pub fn path(&self) -> &Path
Returns the file system path provided to the reader during construction.
Sourcepub async fn reader_without_entry(
&self,
index: usize,
) -> Result<ZipEntryReader<'static, Compat<BufReader<File>>, WithoutEntry>>
pub async fn reader_without_entry( &self, index: usize, ) -> Result<ZipEntryReader<'static, Compat<BufReader<File>>, WithoutEntry>>
Returns a new entry reader if the provided index is valid.
Sourcepub async fn reader_with_entry(
&self,
index: usize,
) -> Result<ZipEntryReader<'_, Compat<BufReader<File>>, WithEntry<'_>>>
pub async fn reader_with_entry( &self, index: usize, ) -> Result<ZipEntryReader<'_, Compat<BufReader<File>>, 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