pub fn create(root: &Cell, is_include: impl Fn(&UInt256) -> bool) -> Result<Self> {

        if !is_include(&root.repr_hash()) {
            fail!(
                BlockError::InvalidArg(
                    "`bag` doesn't contain any cell to include into proof".to_string()
                )
            )
        }

        let proof = Self::create_raw(root, &is_include, 0, &mut None)?;

        Ok(MerkleProof {
            hash: root.repr_hash(),
            depth: root.repr_depth(),
            proof: proof.into_cell()?,
        })
    }
/// Creating of a Merkle proof which includes cells whose hashes contain in `proof_for`.
Creating of a Merkle proof which includes cells whose hashes contain in `proof_for`.
Creating of a Merkle proof which includes cells whose hashes contain in ` proof_for ` .
pub fn create(root: &Cell, is_include: impl Fn(&UInt256) -> bool) -> Result<Self> {
        if !is_include(&root.repr_hash()) {
            fail!(
                BlockError::InvalidArg(
                    "`bag` doesn't contain any cell to include into proof".to_string()
                )
            )
        }
        let proof = Self::create_raw(root, &is_include, 0, &mut None)?;
        Ok(MerkleProof {
            hash: root.repr_hash(),
            depth: root.repr_depth(),
            proof: proof.into_cell()?,
        })
    }
pub fn create ( root : & Cell , is_include : impl Fn ( & UInt256 ) -> bool ) -> Result < Self > { if ! is_include ( & root . repr_hash ( ) ) { fail ! ( BlockError InvalidArg ( " " to_string ( ) ) ) } let proof = Self :: create_raw ( root , & is_include , 0 , & mut None ) ? ; Ok ( MerkleProof { hash : root . repr_hash ( ) , depth : root . repr_depth ( ) , proof : proof . into_cell ( ) ? , } ) }
Creating of a Merkle proof which includes cells whose hashes contain in `proof_for`.
Creating of a Merkle proof which includes cells whose hashes contain in ` proof_for ` .
root
&Cell
is_include
impl Fn(&UInt256) -> bool
root
&Cell
is_include
impl Fn(&UInt256) -> bool