[][src]Trait phar::read::index::Iterable

pub trait Iterable: FileIndex {
    pub fn for_each_file_fold<'t, R, F, G, T, U>(
        &self,
        read: R,
        f: F,
        fold: G
    ) -> Result<Option<T>>
    where
        R: Read + Seek + 't,
        F: FnMut(&[u8], &mut dyn Read) -> Result<U>,
        G: FnMut(Option<T>, U) -> T
; pub fn for_each_file<'t, R, F>(&self, read: R, f: F) -> Result<()>
    where
        R: Read + Seek + 't,
        F: FnMut(&[u8], &mut dyn Read) -> Result<()>
, { ... } }
This is supported on crate feature reader only.

A subfamily of file indices for iterable files.

The iteration order may not be the order in the phar archive, and may not even be stable.

Required methods

pub fn for_each_file_fold<'t, R, F, G, T, U>(
    &self,
    read: R,
    f: F,
    fold: G
) -> Result<Option<T>> where
    R: Read + Seek + 't,
    F: FnMut(&[u8], &mut dyn Read) -> Result<U>,
    G: FnMut(Option<T>, U) -> T, 
[src]

Iterates over the files in this index and fold return values.

Loading content...

Provided methods

pub fn for_each_file<'t, R, F>(&self, read: R, f: F) -> Result<()> where
    R: Read + Seek + 't,
    F: FnMut(&[u8], &mut dyn Read) -> Result<()>, 
[src]

Iterates over the files in this index.

Loading content...

Implementors

impl Iterable for OffsetOnly[src]

impl<M: Default + Extend<(Vec<u8>, (u32, Range<u64>))>> Iterable for NameMap<M> where
    &'t M: IntoIterator<Item = (&'t Vec<u8>, &'t (u32, Range<u64>))>, 
[src]

impl<M: Default + Extend<(Vec<u8>, (Entry, Range<u64>))>> Iterable for MetadataMap<M> where
    &'t M: IntoIterator<Item = (&'t Vec<u8>, &'t (Entry, Range<u64>))>, 
[src]

Loading content...