pub trait Outboard {
    // Required methods
    fn root(&self) -> Hash;
    fn tree(&self) -> BaoTree;
    fn load_raw(&self, node: TreeNode) -> Result<Option<[u8; 64]>>;

    // Provided method
    fn load(&self, node: TreeNode) -> Result<Option<(Hash, Hash)>> { ... }
}
Expand description

An outboard is a just a thing that knows how big it is and can get you the hashes for a node.

Required Methods§

source

fn root(&self) -> Hash

The root hash

source

fn tree(&self) -> BaoTree

The tree. This contains the information about the size of the file and the block size.

source

fn load_raw(&self, node: TreeNode) -> Result<Option<[u8; 64]>>

load the raw bytes for a node, as raw bytes

Provided Methods§

source

fn load(&self, node: TreeNode) -> Result<Option<(Hash, Hash)>>

load the hash pair for a node

Implementors§