Function StaticRingBuffer.firstSegment

Returns the first contiguous physical segment in logical FIFO order.

T[] firstSegment() scope nothrow @nogc @trusted;

const(T)[] firstSegment() scope const nothrow @nogc @trusted;

The returned slice borrows this buffer's inline storage. Successful structural mutation invalidates previously returned segment slices.

Returns

The whole logical sequence when physically contiguous, the tail-side portion when wrapped, or an empty slice when the buffer is empty.

Complexity

O(1).

Allocation

None.