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

Method find_by_index

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

Find a chunk entry by its index. Returns `None` if the index is out of bounds.

(&self, index: u32)

Source from the content-addressed store, hash-verified

318 ///
319 /// Returns `None` if the index is out of bounds.
320 pub fn find_by_index(&self, index: u32) -> Option<&ChunkManifestEntry> {
321 self.entries.iter().find(|e| e.index == index)
322 }
323
324 /// Returns an iterator over all chunk hashes in order.
325 pub fn hashes(&self) -> impl Iterator<Item = &[u8; 32]> {

Callers

nothing calls this directly

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected