Struct ScyllaRingBuffer<T>.ReverseEnumerable
Lightweight wrapper struct that enables foreach loop support for reverse (newest-to-oldest)
iteration over a ScyllaRingBuffer<T>.
Inherited Members
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public readonly struct ScyllaRingBuffer<T>.ReverseEnumerable
Remarks
This struct is a pure adapter - it holds a reference to the ring buffer and returns a ScyllaRingBuffer<T>.ReverseEnumerator on demand. Obtain an instance via AsReversed().
Constructors
ReverseEnumerable(ScyllaRingBuffer<T>)
Initializes a new reverse-enumerable wrapper for the specified ring buffer.
Declaration
public ReverseEnumerable(ScyllaRingBuffer<T> ringBuffer)
Parameters
| Type | Name | Description |
|---|---|---|
| ScyllaRingBuffer<T> | ringBuffer | The ring buffer to iterate in reverse. Must not be |
Methods
GetEnumerator()
Returns a ScyllaRingBuffer<T>.ReverseEnumerator for this ring buffer, enabling foreach support.
Declaration
public ScyllaRingBuffer<T>.ReverseEnumerator GetEnumerator()
Returns
| Type | Description |
|---|---|
| ScyllaRingBuffer<T>.ReverseEnumerator | A ScyllaRingBuffer<T>.ReverseEnumerator positioned before the first (newest) element. |