#[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§
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> StructuralPartialEq for ChangeLog<MAX_DEPTH>
Auto Trait Implementations§
impl<const MAX_DEPTH: usize> Freeze for ChangeLog<MAX_DEPTH>
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