diff --git a/atrium-repo/src/repo.rs b/atrium-repo/src/repo.rs index 618e3b7a..af40a0da 100644 --- a/atrium-repo/src/repo.rs +++ b/atrium-repo/src/repo.rs @@ -263,6 +263,14 @@ impl Repository { Commit { inner: self.latest_commit.clone() } } + /// Open the merkle search tree for the latest commit. + /// + /// This API is for advanced usage. Typically you will want to use the convenience + /// APIs offered by this struct instead. + pub fn tree(&mut self) -> mst::Tree<&mut R> { + mst::Tree::open(&mut self.db, self.latest_commit.data) + } + /// Returns the specified record from the repository, or `None` if it does not exist. pub async fn get( &mut self,