var holding the element value.var.element
var element(size_t index) const @safeBoxes a single element of a native array into a var.
Reads primarily go through typed slices (as!(const(T)[])), which stay zero-copy; element is the on-demand convenience for one value. Native real elements box only when exactly representable as double — otherwise this throws, honoring the no-silent-narrowing contract.
Parameters
index | element index; bounds-checked. |
Returns
A
Throws
VarTypeException for non-native values; VarIndexException when out
of bounds; VarException for unrepresentable real elements.