SpanList<T> Struct
- Namespace
- SatorImaging.UnityFundamentals
public readonly struct SpanList<T> : IEquatable<SpanList<T>>
Type Parameters
T
- Implements
-
IEquatable<SpanList<T>>
- Inherited Members
- Extension Methods
Constructors
Properties
- this[int]
You can take non-readonly view by using GetSpanUnsafe(int, out Span<T>).
Methods
- Equals(SpanList<T>)
Indicates whether the current object is equal to another object of the same type.
- Equals(object?)
Indicates whether this instance and a specified object are equal.
- GetCapacity(int)
Get available capacity for span at the index.
- GetFullRange(int)
Return full range for span at the index. It can be used to restore broken range on unsafe operation.
- GetHashCode()
Returns the hash code for this instance.
- GetSpanUnsafe(int, out Span<T>)
This method returns direct reference to internal array item. You can trim or extend range by editing that.
> [!WARNING] > You need to be familiar with C#'s `ref return` language feature.
> [!CAUTION] > `ref Range` modification will have never been validated by this library.// basic usage spanList.GetSpanUnsafe(i, out var span).SetLength(WriteToBuffer(span, data));