EntryReader

Trait EntryReader 

Source
pub trait EntryReader {
    type RE<'a>: ReadEntry
       where Self: 'a;

    // Required methods
    fn read_next(&mut self) -> Option<Self::RE<'_>>;
    fn read_len(&self) -> usize;

    // Provided methods
    fn read_iter(&mut self) -> ReadEntryIter<'_, Self> 
       where Self: Sized { ... }
    fn read_entries(
        self,
        tx: impl FnMut(NamedEntry) -> Result<()>,
        blacklist: &TypeBlacklist,
    ) -> Result<()>
       where Self: Sized { ... }
}
Expand description

Reads entries from a file-based system. Typically used with EntrySaver.

Required Associated Types§

Source

type RE<'a>: ReadEntry where Self: 'a

A type for reading entries.

Required Methods§

Source

fn read_next(&mut self) -> Option<Self::RE<'_>>

Reads the next entry.

Source

fn read_len(&self) -> usize

Returns the number of entries.

Provided Methods§

Source

fn read_iter(&mut self) -> ReadEntryIter<'_, Self>
where Self: Sized,

Creates an iterator for reading entries.

Source

fn read_entries( self, tx: impl FnMut(NamedEntry) -> Result<()>, blacklist: &TypeBlacklist, ) -> Result<()>
where Self: Sized,

Reads entries, checks if they are not blacklisted and sends them via tx.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I: ExactSizeIterator<Item = Result<(Option<bool>, Box<Path>)>>> EntryReader for FSEntryReader<I>

Source§

type RE<'a> = ReadFileEntry<'a> where Self: 'a

Source§

impl<R: Read + Seek> EntryReader for ZipEntryReader<R>

Source§

type RE<'a> = ReadZipFileEntry<'a, R> where R: 'a