• Effekt Logo Effekt Library
    • buffer
      • BufferOverflow
      • Buffer
        • capacity
        • full?
        • empty?
        • read
        • write
      • emptyBuffer
      • arrayBuffer
      • refBuffer
      • main
    • buffer
    • Jump to source: libraries/common/buffer.effekt
      Example usage: examples/stdlib/buffer
      • BufferOverflow
      • Buffer [T]
      • Fixed-size ring buffers (queues) where one can write
        elements to the head and read from the tail.
        • capacity : Int / {}
        • The remaining capacity
        • full? : Bool / {}
        • Is this buffer full?
        • empty? : Bool / {}
        • Is this buffer empty?
        • read : Option[T] / {}
        • Read an element from the tail of the buffer
        • write (el: T): Unit / {Exception[BufferOverflow]}
        • Write an element to the head of the buffer
      • emptyBuffer [T] (capacity: Int): Buffer[T] at {global} / {}
      • arrayBuffer [T] (initialCapacity: Int): Buffer[T] at {global} / {}
      • refBuffer [T]: Buffer[T] at {global} / {}
      • main