public interface IInlineBuffer<T>A fixed-capacity inline buffer, so that a collection can carry its first N elements inside itself rather than in a separate heap allocation.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The capacity is a static abstract member, which is what lets SmallList`2 be generic over the buffer size without a runtime lookup: the JIT specialises the generic per buffer type and TBuffer.Capacity folds to a constant. Before static abstract interface members this needed either a code generator or a virtual call in the indexer.
Implementations are [InlineArray] structs, which the runtime lays out as N adjacent elements with no header and no indirection.
Fields and properties (1)
int CapacityHow many elements the buffer holds. A compile-time constant per implementation.
Used by (5)
- Buffer16Vixen.Core.Collections
- Buffer32Vixen.Core.Collections
- Buffer4Vixen.Core.Collections
- Buffer8Vixen.Core.Collections
- SmallListVixen.Core.Collections