pub trait FromScalar<T>where
T: ArrayElement,{
// Required method
fn from_scalar(val: T) -> Array;
}
Expand description
A helper trait to construct Array
from scalar values.
This trait is intended to be used with the macro [array!
] but can be used directly if needed.
Required Methods§
Sourcefn from_scalar(val: T) -> Array
fn from_scalar(val: T) -> Array
Create an array from a scalar value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.