pub fn validate_with_data<A: Algorithm<T>>(&self, leaf_data: &dyn Hashable<A>) -> Result<bool> {
        let mut a = A::default();
        leaf_data.hash(&mut a);
        let item = a.hash();
        a.reset();
        let leaf_hash = a.leaf(item);

        if leaf_hash == self.item() {
            self.validate::<A>()
        } else {
            Ok(false)
        }
    }
/// Verifies MT inclusion proof and that leaf_data is the original leaf data for which proof was generated.
Verifies MT inclusion proof and that leaf_data is the original leaf data for which proof was generated.
Verifies MT inclusion proof and that leaf_data is the original leaf data for which proof was generated .
pub fn validate_with_data<A: Algorithm<T>>(&self, leaf_data: &dyn Hashable<A>) -> Result<bool> {
        let mut a = A::default();
        leaf_data.hash(&mut a);
        let item = a.hash();
        a.reset();
        let leaf_hash = a.leaf(item);
        if leaf_hash == self.item() {
            self.validate::<A>()
        } else {
            Ok(false)
        }
    }
pub fn validate_with_data < A : Algorithm < T > > ( & self , leaf_data : & dyn Hashable < A > ) -> Result < bool > { let mut a = A :: default ( ) ; leaf_data . hash ( & mut a ) ; let item = a . hash ( ) ; a . reset ( ) ; let leaf_hash = a . leaf ( item ) ; if leaf_hash == self . item ( ) { self . validate :: < A > ( ) } else { Ok ( false ) } }
Verifies MT inclusion proof and that leaf_data is the original leaf data for which proof was generated.
Verifies MT inclusion proof and that leaf_data is the original leaf data for which proof was generated .
&self
leaf_data
&dyn Hashable<A>