Struct tree_index::TreeIndex [] [src]

pub struct TreeIndex { /* fields omitted */ }

Index a tree structure or something.

Methods

impl TreeIndex
[src]

[src]

Create a new TreeIndex by passing it a sparse_bitfield instance.

[src]

Get a bit from the bitfield.

[src]

Set an index on the tree to true, and also all of the parents to the index. Walks the tree upward.

Returns a "Change" member to indicate if the underlying value was changed.

NOTE: we can probably change the bitfield.set syntax to return false to simplify this code a little.

[src]

Determine which Nodes prove the correctness for the Node at index.

[src]

Create a digest for data at index.

[src]

Get the position of the highest entry in the tree. Aka max.

NOTE: should we rename this to .len() ?

[src]

Get all root nodes.

TODO: don't make this allocate, but fill a vector instead.

[src]

Find the node that verified the node that's passed.

This is different from the Javascript implementation in that it doesn't push the top value into an array, but returns it instead through the Verification type.

Trait Implementations

impl Default for TreeIndex
[src]

Create a TreeIndex with an empty sparse_bitfield instance with a page size of 1024.

[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations

impl Send for TreeIndex

impl Sync for TreeIndex