MCPcopy Create free account
hub / github.com/douchuan/algorithm / peek

Method peek

src/common/queue.rs:30–32  ·  view source on GitHub ↗

Returns the item least recently added to this queue

(&self)

Source from the content-addressed store, hash-verified

28
29 /// Returns the item least recently added to this queue
30 pub fn peek(&self) -> Option<&T> {
31 self.ll.first()
32 }
33
34 /// Returns an iterator that iterates over the items in this queue in FIFO order
35 pub fn iter(&self) -> Iter<'_, T> {

Callers

nothing calls this directly

Calls 1

firstMethod · 0.80

Tested by

no test coverage detected