MCPcopy Create free account
hub / github.com/aws/clock-bound / peek_at

Method peek_at

clock-bound/src/daemon/clock_sync_algorithm/ring_buffer.rs:52–54  ·  view source on GitHub ↗

Returns the value at the given index, or `None` if the index is out of bounds

(&self, index: usize)

Source from the content-addressed store, hash-verified

50
51 /// Returns the value at the given index, or `None` if the index is out of bounds
52 pub fn peek_at(&self, index: usize) -> Option<&T> {
53 self.buffer.get(index)
54 }
55
56 /// Returns the number of values in the buffer
57 pub fn len(&self) -> usize {

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected