Class ScyllaBitArrayDOTS.Builder
Fluent builder for constructing ScyllaBitArrayDOTS instances.
Inherited Members
Namespace: Scylla.Core.Structures
Assembly: ScyllaCore.dll
Syntax
public sealed class ScyllaBitArrayDOTS.Builder
Remarks
Use CreateBuilder() to obtain a new builder rather than constructing one directly. Both WithAllocator(Allocator) and WithCapacity(int) may be called in any order before calling Build(). WithAllocator(Allocator) is mandatory; Build() throws if it has not been called.
Methods
Build()
Constructs and returns the configured ScyllaBitArrayDOTS instance.
Declaration
public ScyllaBitArrayDOTS Build()
Returns
| Type | Description |
|---|---|
| ScyllaBitArrayDOTS | The configured, fully allocated ScyllaBitArrayDOTS. |
Remarks
The returned struct owns the native buffer and must be disposed via Dispose() when no longer needed to prevent native memory leaks.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown when WithAllocator(Allocator) has not been called before Build(). |
WithAllocator(Allocator)
Configures the Unity memory allocator for the native word buffer.
Declaration
public ScyllaBitArrayDOTS.Builder WithAllocator(Allocator allocator)
Parameters
| Type | Name | Description |
|---|---|---|
| Allocator | allocator | The allocator to use. Must not be |
Returns
| Type | Description |
|---|---|
| ScyllaBitArrayDOTS.Builder | This builder instance for method chaining. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | Thrown when |
WithCapacity(int)
Configures the bit capacity of the array to be built.
Declaration
public ScyllaBitArrayDOTS.Builder WithCapacity(int capacity)
Parameters
| Type | Name | Description |
|---|---|---|
| int | capacity | The desired number of bits. Must be at least |
Returns
| Type | Description |
|---|---|
| ScyllaBitArrayDOTS.Builder | This builder instance for method chaining. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | Thrown when |