src/hpack/ring

Search:
Group by:

Ring buffer queue

Types

Ring[T] = object
A queue that adds at the front and removes at the back. Index 0 is the front. It grows as needed, and never shrinks

Procs

func `==`[T](a, b: Ring[T]): bool {....raises: [].}
Compare the entries, not the buffer layout
func `[]`[T](r: Ring[T]; i: int): lent T {.inline, ...raises: [].}
func addFirst[T](r: var Ring[T]; x: sink T) {.inline, ...raises: [].}
func clear[T](r: var Ring[T]) {.inline, ...raises: [].}
func len[T](r: Ring[T]): int {.inline, ...raises: [].}
func popLast[T](r: var Ring[T]): T {.inline, ...raises: [].}