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
sourceimpl<const MAX_DEPTH: usize> ChangeLog<MAX_DEPTH>
impl<const MAX_DEPTH: usize> ChangeLog<MAX_DEPTH>
pub fn default() -> Self
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
sourceimpl<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
impl<T> AbiExample for T
impl<T> AbiExample for T
default fn example() -> T
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more