Constructor. The queue's memory buffer is allocated by the GC.
Constructor. Allocates the queue's memory buffer with the provided memory manager.
Removes all items from the queue.
Restores the queue state and contents, reading from input and expecting data previously written by save() to an output stream.
Restores the queue state and contents.
Peeks at the item that would be popped next.
Pops an item from the queue.
Pushes an item into the queue.
Reserves space for an item of <size> bytes on the queue but doesn't fill the content. The caller is expected to fill in the content using the returned slice.
Writes the queue's state and contents to the given output stream in the following format:
Calls the provided delegate, store(), to store the queue state and contents.
Finds out whether the provided item will fit in the queue. Also considers the need of wrapping.
Finds out whether the provided number of bytes will fit in the queue. Also considers the need of wrapping.
Tells how much space an item would take up when written into the queue. (Including the size of the required item header.)
Tells how much space an item of the specified size would take up when written into the queue. (Including the size of the required item header.)
Metadata header for saving/loading the queue state
Simple ubyte-based ring queue.
TODO: usage example