pub trait ReadTree: HasReport {
type E: Entry;
type I: Iterator<Item = Result<Self::E>>;
type R: Read;
fn iter_entries(&self, report: &Report) -> Result<Self::I>;
fn file_contents(&self, entry: &Self::E) -> Result<Self::R>;
fn estimate_count(&self) -> Result<u64>;
fn size(&self) -> Result<TreeSize> { ... }
}
Expand description
Abstract Tree that may be either on the real filesystem or stored in an archive.
Required Associated Types§
Required Methods§
fn iter_entries(&self, report: &Report) -> Result<Self::I>
fn file_contents(&self, entry: &Self::E) -> Result<Self::R>
sourcefn estimate_count(&self) -> Result<u64>
fn estimate_count(&self) -> Result<u64>
Estimate the number of entries in the tree.
This might do somewhat expensive IO, so isn’t the Iter’s size_hint
.