Exposes a GetEnumerator method with a non-allocating HashSet.Enumerator struct.
This is an advanced performance optimization for scenarios where an interface representation of a hash set is needed, but the allocations associated with boxing the enumerator as an IEnumerable<T> are problematic (for example, because of invocation in per-frame logic as in Interactable<TInteractor, TInteractable>). In general, iteration over concrete collection types avoids the need for this interface; but for scenarios where exposing the full contract of a HashSet would be improper (as again in Interactable<TInteractor, TInteractable>s, where
Interactable<TInteractor, TInteractable>.Interactors should expose the ability to
enumerate the collection without the ability to
modify the collection), this interface and its implementing type EnumerableHashSet<T> can fulfill the required contract without unintended allocations.