Struct spl_concurrent_merkle_tree::changelog::ChangeLog
source · #[repr(C)]pub struct ChangeLog<const MAX_DEPTH: usize> {
pub root: Node,
pub path: [Node; MAX_DEPTH],
pub index: u32,
pub _padding: u32,
}
Expand description
Stores the path of nodes changed in a tree by a Merkle tree operation
Fields§
§root: Node
Historical root value before Path was applied
path: [Node; MAX_DEPTH]
Nodes of off-chain merkle tree
index: u32
Bitmap of node parity (used when hashing)
_padding: u32
Implementations§
source§impl<const MAX_DEPTH: usize> ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> ChangeLog<MAX_DEPTH>
pub fn new(root: Node, path: [Node; MAX_DEPTH], index: u32) -> Self
sourcepub fn get_leaf(&self) -> Node
pub fn get_leaf(&self) -> Node
Returns the leaf value modified when the change log was recorded
Trait Implementations§
source§impl<const MAX_DEPTH: usize> PartialEq<ChangeLog<MAX_DEPTH>> for ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> PartialEq<ChangeLog<MAX_DEPTH>> for ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> Copy for ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> Eq for ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> StructuralEq for ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> StructuralPartialEq for ChangeLog<MAX_DEPTH>
Auto Trait Implementations§
impl<const MAX_DEPTH: usize> RefUnwindSafe for ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> Send for ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> Sync for ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> Unpin for ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> UnwindSafe for ChangeLog<MAX_DEPTH>
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more