Struct ScyllaPriorityQueue<T>.Enumerator
A forward-only, value-type enumerator for ScyllaPriorityQueue<T> that enables
allocation-free iteration when used with the concrete queue type in a foreach loop.
Inherited Members
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public struct ScyllaPriorityQueue<T>.Enumerator
Remarks
Elements are visited in heap internal order (index 0 is the root / highest-priority item).
The order of remaining elements is determined by heap invariants, not by dequeue order.
The enumerator does not support Reset; create a new instance via
GetEnumerator() to restart iteration.
Constructors
Enumerator(ScyllaPriorityQueue<T>)
Initializes a new ScyllaPriorityQueue<T>.Enumerator positioned before the first element of the given queue.
Declaration
public Enumerator(ScyllaPriorityQueue<T> queue)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaPriorityQueue<T> | queue | The queue to iterate. Must not be |
Properties
Current
Gets the element at the current position of the enumerator.
Declaration
public readonly T Current { get; }
Property Value
| Type | Description |
|---|---|
| T | The element at the current heap index. Before the first call to MoveNext(),
or after MoveNext() returns |
Methods
MoveNext()
Advances the enumerator to the next element in heap internal order.
Declaration
public bool MoveNext()
Returns
| Type | Description |
|---|---|
| bool |
|