Struct akd::history_tree_node::HistoryTreeNode
source · [−]pub struct HistoryTreeNode {
pub label: NodeLabel,
pub last_epoch: u64,
pub birth_epoch: u64,
pub parent: NodeLabel,
pub node_type: NodeType,
}
Expand description
A HistoryNode represents a generic interior node of a compressed history tree. The main idea here is that the tree is changing at every epoch and that we do not need to replicate the state of a node, unless it changes. However, in order to allow for a user to monitor the state of a key-value pair in the past, the older states also need to be stored. While the states themselves can be stored elsewhere, we need a list of epochs when this node was updated, and that is what this data structure is meant to do.
Fields
label: NodeLabel
The binary label for this node
last_epoch: u64
The last epoch this node was updated in
birth_epoch: u64
The epoch that this node was birthed in
parent: NodeLabel
The label of this node’s parent
node_type: NodeType
The type of node: leaf root or interior.
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Must return a valid storage type
Retrieve an instance of the id of this storable. The combination of the storable’s StorageType and this id are globally unique Read more
Retrieve the full binary version of a key (for comparisons)
Reformat a key from the full-binary specification
Retrieve the full binary version of a key (for comparisons)
Auto Trait Implementations
impl RefUnwindSafe for HistoryTreeNode
impl Send for HistoryTreeNode
impl Unpin for HistoryTreeNode
impl UnwindSafe for HistoryTreeNode
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.