shardtree: Add `ShardTree::store_mut`

This commit is contained in:
Kris Nuttycombe 2024-03-11 13:03:03 -06:00
parent 25cb18973e
commit fa147c89c6
2 changed files with 6 additions and 1 deletions

View File

@ -8,7 +8,7 @@ and this project adheres to Rust's notion of
## Unreleased
## Added
* `Shardtree::store`
* `Shardtree::{store, store_mut}`
- `ShardTree::insert_frontier`
## Changed

View File

@ -97,6 +97,11 @@ impl<
&self.store
}
/// Returns a mutable reference to the underlying [`ShardStore`].
pub fn store_mut(&mut self) -> &mut S {
&mut self.store
}
/// Returns the root address of the tree.
pub fn root_addr() -> Address {
Address::from_parts(Level::from(DEPTH), 0)