Skip to main content

tree_diff_streaming

Function tree_diff_streaming 

Source
pub async fn tree_diff_streaming<S, F>(
    tree: &HashTree<S>,
    old_hashes: &HashSet<Hash>,
    new_root: &Cid,
    concurrency: usize,
    callback: F,
) -> Result<DiffStats, HashTreeError>
where S: Store, F: FnMut(Hash) -> bool,
Expand description

Streaming diff - yields hashes as they’re discovered

Memory efficient for very large trees. Yields hashes that need upload one at a time instead of collecting into a Vec.