Struct indexed_merkle_tree::InnerNode
source · pub struct InnerNode {
pub hash: String,
pub is_left_sibling: bool,
pub left: Arc<Node>,
pub right: Arc<Node>,
}
Expand description
Represents an inner node in the indexed Merkle Tree.
This structure is used for non-leaf nodes in the tree, containing references to its left and right children along with its own hash value. There is no difference between inner nodes of an indexed Merkle Tree and a classic Merkle Tree.
Fields:
hash
: The hash of the current node, derived from its children.is_left_sibling
: Indicates whether this node is a left child of its parent.left
: A reference-counted pointer to the left child node.right
: A reference-counted pointer to the right child node.
Fields§
§hash: String
§is_left_sibling: bool
§left: Arc<Node>
§right: Arc<Node>
Trait Implementations§
source§impl<'de> Deserialize<'de> for InnerNode
impl<'de> Deserialize<'de> for InnerNode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for InnerNode
impl Send for InnerNode
impl Sync for InnerNode
impl Unpin for InnerNode
impl UnwindSafe for InnerNode
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