pub fn with_hasher(db: DB, hasher: H) -> anyhow::Result<Self> {
        let tags = db.manifest().and_then(|manifest| manifest.tags);
        if let Some(tags) = tags {
            tags.ensure_consistency(&hasher, false)?;
        }
        // If there are currently no tags in the tree, we consider that it fits
        // for backward compatibility. The tags will be added the next time the tree is saved.

        Ok(Self { db, hasher })
    }
Loads a tree with the specified hasher.

# Errors

Errors if the hasher or basic tree parameters (e.g., the tree depth)
do not match those of the tree loaded from the database.
core/lib/merkle_tree/src/lib.rs