[−][src]Trait phar::read::index::FileIndex
reader
only.The storage used to store file indices.
If you open the phar only to view the stub, phar metadata, etc.,
use index::NoIndex
.
To sequentially access all files in the archive,
use index::Iterable
implementations.
If random file access is not required,
use index::OffsetOnly
.
To access specific files only,
use index::RandomAccess
implementations.
Prefer using NameMap
if individual entry metadata is not required.
To also access their metadata,
use MetadataMap
.
There are some type aliases for the respective HashMap/BTreeMap implementations.
Required methods
pub fn feed_entry(&mut self, offset: u64, entry: Entry) -> Result<()>
[src]
Adds an Entry
to the index.
Provided methods
pub fn scan_files() -> bool
[src]
Whether file metadata should be scanned on loading.
pub fn requires_name() -> bool
[src]
Whether Entry
should force name
to use Section::Cached
.
pub fn requires_metadata() -> bool
[src]
Whether Entry
should force metadata
to use Section::Cached
.
pub fn end_of_header(&mut self, _offset: u64)
[src]
Marks the end of header
Implementors
impl FileIndex for NoIndex
[src]
pub fn scan_files() -> bool
[src]
pub fn feed_entry(&mut self, _: u64, _: Entry) -> Result<()>
[src]
impl FileIndex for OffsetOnly
[src]
pub fn feed_entry(&mut self, _: u64, entry: Entry) -> Result<()>
[src]
pub fn end_of_header(&mut self, offset: u64)
[src]
impl<M: Default + Extend<(Vec<u8>, (u32, Range<u64>))>> FileIndex for NameMap<M> where
&'t M: IntoIterator<Item = (&'t Vec<u8>, &'t (u32, Range<u64>))>,
[src]
&'t M: IntoIterator<Item = (&'t Vec<u8>, &'t (u32, Range<u64>))>,
pub fn requires_name() -> bool
[src]
pub fn end_of_header(&mut self, offset: u64)
[src]
pub fn feed_entry(&mut self, _: u64, entry: Entry) -> Result<()>
[src]
impl<M: Default + Extend<(Vec<u8>, (Entry, Range<u64>))>> FileIndex for MetadataMap<M> where
&'t M: IntoIterator<Item = (&'t Vec<u8>, &'t (Entry, Range<u64>))>,
[src]
&'t M: IntoIterator<Item = (&'t Vec<u8>, &'t (Entry, Range<u64>))>,