Table of Contents

Struct SwiftArrayState<T>

Namespace
SwiftCollections
Assembly
SwiftCollections.dll

Represents an immutable snapshot of an array of items of the specified type.

[MemoryPackable(GenerateType.Object)]
public readonly struct SwiftArrayState<T> : IMemoryPackable<SwiftArrayState<T>>, IMemoryPackFormatterRegister

Type Parameters

T

The type of elements contained in the array.

Implements
IMemoryPackable<SwiftArrayState<T>>
IMemoryPackFormatterRegister
Inherited Members

Remarks

This struct is intended for scenarios where a value-type representation of an array is needed, such as serialization or state management. The array referenced by the Items field should not be modified after construction to preserve immutability.

Constructors

SwiftArrayState(T[])

Initializes a new instance of the SwiftArrayState class with the specified items.

[JsonConstructor]
[MemoryPackConstructor]
public SwiftArrayState(T[] items)

Parameters

items T[]

The array of items to initialize the state with. Cannot be null.

Fields

Items

Gets the array of items contained in the collection.

[JsonInclude]
[MemoryPackInclude]
public readonly T[] Items

Field Value

T[]