MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / find_by_hash

Method find_by_hash

atomic-remote/src/streaming/layers.rs:313–315  ·  view source on GitHub ↗

Find a chunk entry by its hash. Returns `None` if no chunk with the given hash exists.

(&self, hash: &[u8; 32])

Source from the content-addressed store, hash-verified

311 ///
312 /// Returns `None` if no chunk with the given hash exists.
313 pub fn find_by_hash(&self, hash: &[u8; 32]) -> Option<&ChunkManifestEntry> {
314 self.entries.iter().find(|e| &e.hash == hash)
315 }
316
317 /// Find a chunk entry by its index.
318 ///

Callers 1

Calls 1

iterMethod · 0.45

Tested by 1