/// Updates the metadata hash associated with this label, or returns an
/// error if a matching leaf node is not found.
Updates the metadata hash associated with this label, or returns an
error if a matching leaf node is not found.
Updates the metadata hash associated with this label or returns an error if a matching leaf node is not found .
fn update_leaf_hash(&mut self, label: &Label, metadata: Hash) -> Result<bool, HashTreeError> {
        match self.root.write_leaf(label, &Some(metadata)) {
            WriteLeafOutcome::LeafUpdated => Ok(true),
            WriteLeafOutcome::NonLeafNodeFound => Err(HashTreeError::NonLeafLabel),
            WriteLeafOutcome::NotFound => Err(HashTreeError::UnknownLeafLabel),
        }
    }
fn update_leaf_hash ( & mut self , label : & Label , metadata : Hash ) -> Result < bool , HashTreeError > { match self . root . write_leaf ( label , & Some ( metadata ) ) { WriteLeafOutcome :: LeafUpdated => Ok ( true ) , WriteLeafOutcome :: NonLeafNodeFound => Err ( HashTreeError :: NonLeafLabel ) , WriteLeafOutcome :: NotFound => Err ( HashTreeError :: UnknownLeafLabel ) , } }
Updates the metadata hash associated with this label, or returns an
error if a matching leaf node is not found.
Updates the metadata hash associated with this label or returns an error if a matching leaf node is not found .
&mut self
label
&Label
metadata
Hash