MCPcopy Create free account
hub / github.com/carsonpo/haystackdb / get_commit

Method get_commit

src/structures/wal.rs:261–266  ·  view source on GitHub ↗
(&mut self, hash: u64)

Source from the content-addressed store, hash-verified

259 }
260
261 pub fn get_commit(&mut self, hash: u64) -> Result<Option<CommitListItem>, io::Error> {
262 match self.commit_list.search(hash) {
263 Ok(v) => Ok(v),
264 Err(_) => Ok(None),
265 }
266 }
267
268 pub fn get_commits_before(&mut self, timestamp: u64) -> Result<Vec<CommitListItem>, io::Error> {
269 let hash_end = self.timestamps.get_range(0, timestamp)?;

Callers

nothing calls this directly

Calls 1

searchMethod · 0.45

Tested by

no test coverage detected