pub trait FromNested<T> {
// Required method
fn from_nested(data: T) -> Array;
}
Expand description
A helper trait to construct Array
from nested arrays or slices.
Given that this is not intended for use other than the macro [array!
], this trait is added
instead of directly implementing From
for Array
to avoid conflicts with other From
implementations.
Beware that this is subject to change in the future should we find a better way to implement the macro without creating conflicts.
Required Methods§
Sourcefn from_nested(data: T) -> Array
fn from_nested(data: T) -> Array
Create an array from nested arrays or slices.
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.