Table of Contents

Class WelderSpanExtensions

Namespace
WoWLib
Assembly
WoWLib.dll

The zero-copy scalar-span surface. AsSpan() lives here as a CONSTRAINED extension (an instance method cannot constrain the class's own T; an extension can — the MemoryExtensions pattern), so it only exists for unmanaged (scalar/enum) elements: calling it on a container of record or nested-container elements is a compile error, not a runtime throw. For record elements use AsDataSpan() / AsSpan<TData>(); for nested containers, index in first.

public static class WelderSpanExtensions
Inheritance
WelderSpanExtensions
Inherited Members

Methods

AsSpan<T>(FixedArray<T>)

A zero-copy span over the C++ buffer; valid until Dispose.

public static Span<T> AsSpan<T>(this FixedArray<T> a) where T : unmanaged

Parameters

a FixedArray<T>

Returns

Span<T>

Type Parameters

T

AsSpan<T>(Vector<T>)

A zero-copy span over the C++ buffer; valid until a size-changing operation or Dispose.

public static Span<T> AsSpan<T>(this Vector<T> v) where T : unmanaged

Parameters

v Vector<T>

Returns

Span<T>

Type Parameters

T