ReadableArrayBuilder<'T> Type
Append-only builder that materialises into a ReadableArray, usually without copying. Single-shot: after ToReadableArray the builder releases its buffer.
Constructors
| Constructor | Description |
|
|
Full Usage:
ReadableArrayBuilder(initialCapacity)
Parameters:
int
Returns: ReadableArrayBuilder<'T>
|
|
Instance members
| Instance member | Description |
Full Usage:
this.Add
Parameters:
'T
|
|
Full Usage:
this.Capacity
Returns: int
|
|
Full Usage:
this.Count
Returns: int
|
|
Full Usage:
this[index]
Returns: int
|
|
|
Returns a ReadableArray viewing the first `count` slots of the backing buffer. Always zero-copy: parsing consumers typically work with reasonably-sized buffers and the result is one-shot, so retaining some unused capacity is cheaper than allocating a fresh array + copy (which also punishes LOH-sized buffers by round-tripping through the Gen2 heap). Single-shot: releases the builder's reference — do not reuse.
|