Struct UnsafeList<T>.ParallelReader
Obsolete. Use UnsafeList<T>.ReadOnly instead.
Namespace: Unity.Collections.LowLevel.Unsafe
Assembly: Unity.Collections.dll
Syntax
public struct UnsafeList<T>.ParallelReader
Remarks
Use AsParallelReader() to create a parallel reader for a list.
Fields
Length
The number of elements.
Declaration
public readonly int Length
Field Value
| Type | Description |
|---|---|
| int |
Ptr
The internal buffer of the list.
Declaration
[NativeDisableUnsafePtrRestriction]
public readonly T* Ptr
Field Value
| Type | Description |
|---|---|
| T* |
Methods
AsReadOnlySpan()
Returns ReadOnlySpan<T> view of this container.
Declaration
public readonly ReadOnlySpan<T> AsReadOnlySpan()
Returns
| Type | Description |
|---|---|
| ReadOnlySpan<T> | ReadOnlySpan<T> view of this container. |
GetUnsafeReadOnlyPtr()
Get a pointer to the data.
Declaration
public readonly T* GetUnsafeReadOnlyPtr()
Returns
| Type | Description |
|---|---|
| T* | A pointer to the data. |
Remarks
When container has safety checks enabled it performs a job safety check for read-only access.
Operators
implicit operator ReadOnlySpan<T>(in ParallelReader)
Implicit cast to ReadOnlySpan<T>.
Declaration
public static implicit operator ReadOnlySpan<T>(in UnsafeList<T>.ParallelReader container)
Parameters
| Type | Name | Description |
|---|---|---|
| UnsafeList<T>.ParallelReader | container | Container to cast to ReadOnlySpan<T>. |
Returns
| Type | Description |
|---|---|
| ReadOnlySpan<T> | ReadOnlySpan<T> view of this container. |