pub struct MerkleProof { /* private fields */ }Expand description
Sibling nodes and directions for one Merkle inclusion proof.
Implementations§
Source§impl MerkleProof
impl MerkleProof
Sourcepub fn new_from_parts(siblings: Vec<Hash>, is_left: Vec<bool>) -> Result<Self>
pub fn new_from_parts(siblings: Vec<Hash>, is_left: Vec<bool>) -> Result<Self>
Construct a checked proof representation.
§Errors
Returns an error unless each sibling has one matching direction flag.
Sourcepub fn sibling_is_left(&self) -> &[bool]
pub fn sibling_is_left(&self) -> &[bool]
Return whether each sibling appears to the left of the running hash.
Auto Trait Implementations§
impl Forget for MerkleProof
impl Freeze for MerkleProof
impl Move for MerkleProof
impl RefUnwindSafe for MerkleProof
impl Send for MerkleProofwhere
RawVecInner: Send,
impl Sync for MerkleProofwhere
RawVecInner: Sync,
impl Unpin for MerkleProof
impl UnsafeUnpin for MerkleProofwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Hash>: UnsafeUnpin,
PhantomData<bool>: UnsafeUnpin,
impl UnwindSafe for MerkleProofwhere
RawVecInner: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more