RingBuffer.append

bool append(scope const(ubyte)[] data) @trusted nothrow @nogc

Append data to the buffer.

Data is copied into the ring buffer (Copy semantics per TERMINOLOGY.md). The caller may reuse or free the source buffer immediately after this call returns.

When data wraps around the end of storage it is written as two contiguous copies: one from _head to end-of-storage, the other from start-of-storage. No intermediate allocation occurs.

Parameters

dataBytes to append. Must not be empty.

Returns

true if all bytes were appended.

false if insufficient free space — no bytes are appended.