NoAllocHashSet
1 min read • 116 wordsnamespace InitialPrefabs.Collections
A stack only hashset that uses a Span{T} as its internal data structure.
Any type implementing IEquatable{T}
int FillSpan(ref Span<T> span)
bool TryAdd(T item)
Attempts to add an element to the HashSet if it does not exist.
| Parameter | Description |
|---|---|
| item | The value to add |
bool - True, if added
void Clear()
Clears all elements within the NoAllocHashSet{T]}
bool Contains(T item)
Checks if an element exists in the hash set.
| Parameter | Description |
|---|---|
| item | The element to find |
bool - True, if it exists, otherwise false
Go back to API Home