pub enum NodeType {
Leaf,
Root,
Interior,
}
Expand description
There are three types of nodes: root, leaf and interior. This enum is used to mark nodes using the node_type variable of a TreeNode.
Variants
Leaf
Nodes with this type only have dummy children. Their value is input when they’re created and the hash is H(value, creation_epoch)
Root
Nodes with this type do not have parents and their value, like Interior below, is a hash of their children’s hash along with their respective labels.
Interior
Nodes of this type must have non-dummy children and their value is a hash of their children, along with the labels of the children.
Trait Implementations
impl Copy for NodeType
impl Eq for NodeType
impl StructuralEq for NodeType
impl StructuralPartialEq for NodeType
Auto Trait Implementations
impl RefUnwindSafe for NodeType
impl Send for NodeType
impl Sync for NodeType
impl Unpin for NodeType
impl UnwindSafe for NodeType
Blanket Implementations
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
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.