Skip to content

Commit

Permalink
Repository::tree API
Browse files Browse the repository at this point in the history
  • Loading branch information
DrChat committed Feb 16, 2025
1 parent f1a491f commit 0293593
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions atrium-repo/src/repo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@ impl<R: AsyncBlockStoreRead> Repository<R> {
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<C: Collection>(
&mut self,
Expand Down

0 comments on commit 0293593

Please sign in to comment.