Struct pna::ArchiveReader
source · pub struct ArchiveReader<R> { /* private fields */ }Expand description
A reader for Portable-Network-Archive.
Implementations§
source§impl<R> ArchiveReader<R>where
R: Read,
impl<R> ArchiveReader<R>where R: Read,
sourcepub fn read_header(reader: R) -> Result<ArchiveReader<R>, Error>
pub fn read_header(reader: R) -> Result<ArchiveReader<R>, Error>
Reads the archive header from the provided reader and returns a new ArchiveReader.
Arguments
reader- The reader to read from.
Returns
A new ArchiveReader.
Errors
Returns an error if an I/O error occurs while reading from the reader.
sourcepub fn entries(&mut self) -> impl Iterator<Item = Result<impl ReadEntry, Error>>
pub fn entries(&mut self) -> impl Iterator<Item = Result<impl ReadEntry, Error>>
Returns an iterator over the entries in the archive, excluding entries in solid mode.
Returns
An iterator over the entries in the archive.
sourcepub fn entries_with_password(
&mut self,
password: Option<String>
) -> impl Iterator<Item = Result<impl ReadEntry, Error>>
pub fn entries_with_password( &mut self, password: Option<String> ) -> impl Iterator<Item = Result<impl ReadEntry, Error>>
Returns an iterator over the entries in the archive, including entries in solid mode.
Returns
An iterator over the entries in the archive.
sourcepub fn next_archive(&self) -> bool
pub fn next_archive(&self) -> bool
sourcepub fn read_next_archive<OR>(
self,
reader: OR
) -> Result<ArchiveReader<OR>, Error>where
OR: Read,
pub fn read_next_archive<OR>( self, reader: OR ) -> Result<ArchiveReader<OR>, Error>where OR: Read,
Auto Trait Implementations§
impl<R> RefUnwindSafe for ArchiveReader<R>where R: RefUnwindSafe,
impl<R> Send for ArchiveReader<R>where R: Send,
impl<R> Sync for ArchiveReader<R>where R: Sync,
impl<R> Unpin for ArchiveReader<R>where R: Unpin,
impl<R> UnwindSafe for ArchiveReader<R>where R: UnwindSafe,
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