Expand description
§Example
extern crate sparse_bitfield as bitfield;
extern crate tree_index;
use tree_index::TreeIndex;
use self::bitfield::{Bitfield, Change};
let bitfield = Bitfield::new(1024);
let mut tree = TreeIndex::new(bitfield);
assert_eq!(tree.set(0), Change::Changed);
assert_eq!(tree.set(0), Change::Unchanged);
assert_eq!(tree.get(0), true);
assert_eq!(tree.get(1), false);
Structs§
- Bitfield
- Bitfield instance.
- Proof
- A merkle proof for an index.
- Tree
Index - Index a tree structure or something.
- Verification
- Returned by
.verified_by()
.
Enums§
- Change
- Determine wether the
bitfield.set()
method changed the underlying value.