Interface IAlloaction<T>
An allocation.
public interface IAlloaction<T> : IReadonlyAllocation<T>, IAllocationBase, IDisposable, IRefEnumerable<T>, IEnumerable<T>, IEnumerable where T : struct
Type Parameters
T
The contained type.
- Inherited Members
Properties
IsReallocatable
True if this allocation can be reallocated.
bool IsReallocatable { get; }
Property Value
this[int]
Access item.
ref T this[int i] { get; }
Parameters
i
intThe item index. Must be less than count.
Property Value
- T
Reference to the item.
Methods
AsSpan()
This allocation as span.
Span<T> AsSpan()
Returns
- Span<T>
Span to this allocation.
Remarks
The data pointed to by the span might be volatile. Watch out for implementation details.
Reallocate(int)
Reallocate this allocation with a new size.
void Reallocate(int newSize)
Parameters
newSize
intThe new number of items to have.