Trait hypercore::NodeTrait [−][src]
pub trait NodeTrait { fn len(&self) -> usize; fn is_empty(&self) -> bool; fn parent(&self) -> usize; fn index(&self) -> usize; fn hash(&self) -> &[u8]; }
Functions that need to be implemented for the Data that MerkleTreeStream
works with.
Required Methods
fn len(&self) -> usize
Get the length of the node.
fn is_empty(&self) -> bool
Check if the length is zero.
fn parent(&self) -> usize
Get the position of the parent of the node.
fn index(&self) -> usize
Get the position at which the node was found.
fn hash(&self) -> &[u8]
Get the hash contained in the node.
Implementations on Foreign Types
impl Node for DefaultNode
[src]
impl Node for DefaultNode
Implementors
impl NodeTrait for Node