Trait hybrid_array::ArrayExt
source · pub trait ArrayExt<T>: Sized {
// Required methods
fn from_fn<F>(cb: F) -> Self
where F: FnMut(usize) -> T;
fn from_slice(slice: &[T]) -> Result<Self, TryFromSliceError>
where T: Copy;
}
Expand description
Extension trait with helper functions for core arrays.
Required Methods§
sourcefn from_slice(slice: &[T]) -> Result<Self, TryFromSliceError>where
T: Copy,
fn from_slice(slice: &[T]) -> Result<Self, TryFromSliceError>where
T: Copy,
Create array from a slice, returning TryFromSliceError
if the slice
length does not match the array length.
Object Safety§
This trait is not object safe.