_typedArrayImmutableBuffer

private fnvar _typedArrayImmutableBuffer(E)(immutable(E)[] elements) if (var._nativeKindOf!E != var.ElementType.NONE) @safe

Wraps an immutable slice of whitelisted native element type E in a var without boxing its elements.

Internal construction path for immutable code-unit buffers whose slice type collides with the string family (immutable(char)[] etc.): the public typedArray overload rejects those types as STRING values, but explicit buffers originating from static character arrays are native code-unit buffers by the advertised whitelist.

Parameters

elementsthe immutable native slice to share.

Returns

A var of kind Type.NATIVE_ARRAY with element kind E and the

immutable qualifier.