Results for “Std.RingBuffer.RingBuffer”
11 matching declarations
Use module:Std.List, kind:fn, or is:exact. Put a Pudu type after ::.
- Std.RingBuffer.RingBuffer
A bounded, power-of-two circular FIFO ring buffer with branchless bitmask wrapping.
- Std.RingBuffer.capacity
&Std.RingBuffer.RingBuffer -> IntReturns the total power-of-two capacity of the buffer.
- Std.RingBuffer.clear
&Std.RingBuffer.RingBuffer -> Std.RingBuffer.RingBufferClears all elements from the ring buffer.
- Std.RingBuffer.create
Int -> Std.RingBuffer.RingBufferCreates a ring buffer whose capacity is rounded up to the nearest power of two (min 4).
- Std.RingBuffer.isEmpty
&Std.RingBuffer.RingBuffer -> BoolWhether the buffer contains no elements.
- Std.RingBuffer.isFull
&Std.RingBuffer.RingBuffer -> BoolWhether the buffer has reached maximum capacity.
- Std.RingBuffer.peek
&Std.RingBuffer.RingBuffer -> Option[Int]Peeks at the item at the head of the buffer without removing it.
- Std.RingBuffer.pop
&Std.RingBuffer.RingBuffer -> Option[Std.RingBuffer.PopResult]Dequeues an item from the head of the buffer. Returns None if the buffer is empty.
- Std.RingBuffer.push
&Std.RingBuffer.RingBuffer -> Int -> Option[Std.RingBuffer.RingBuffer]Enqueues an item at the tail of the buffer. Returns None if the buffer is full.
- Std.RingBuffer.size
&Std.RingBuffer.RingBuffer -> IntReturns the number of elements currently stored.
- Std.RingBuffer.toArray
&Std.RingBuffer.RingBuffer -> Array[Int]Returns the elements in FIFO order from head to tail.
