Trait conserve::ReadTree

source ·
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§

Estimate the number of entries in the tree. This might do somewhat expensive IO, so isn’t the Iter’s size_hint.

Provided Methods§

Measure the tree size: typically requires walking all entries so takes a while.

Implementors§