Merge pull request #97 from nuttycom/shardtree_store_ref

shardtree: Add an accessor for a `ShardTree`'s underlying `ShardStore`
This commit is contained in:
Kris Nuttycombe 2024-03-11 11:31:32 -06:00 committed by GitHub
commit 07564eace4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View File

@ -7,6 +7,9 @@ and this project adheres to Rust's notion of
## Unreleased
## Added
* `Shardtree::store`
## [0.2.0] - 2023-11-07
## Added

View File

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