Elements that can be used as direct operands in arithmetic with arrays.
f64 is a
ScalarOperand which means that for an array
a + 1.0, and,
a * 2., and
a += 3. are allowed.
In the description below, let
A be an array or array view,
B be an array with owned data,
C be an array with mutable data.
ScalarOperand determines for which scalars
&A @ K, and
B @ K,
C @= K are defined, as right hand side operands, for applicable
arithmetic operators (denoted
Left hand side scalar operands are not related to this trait
(they need one
impl per concrete scalar type); but they are still
implemented for the same types, allowing operations
K @ &A, and
K @ B for primitive numeric types
This trait does not limit which elements can be stored in an array in general.
ScalarOperand types can still participate in arithmetic as array elements in
in array-array operations.