Function SegmentedBuffer.consume

Consumes up to count elements from the front without flattening.

size_t consume(
  size_t count
);

The return value is the number actually consumed, which is smaller than count only when the buffer did not contain that many elements. Fully consumed segments are recycled internally for later appends. Existing borrowed segment slices must be discarded after a non-zero result.