FromArray

Trait FromArray 

Source
pub trait FromArray<T, const N: usize>: From<[T; N]> {
    // Provided methods
    fn from_array(value: [T; N]) -> Self { ... }
    fn from_fn<F>(f: F) -> Self
       where F: FnMut(usize) -> T { ... }
    fn splat(val: T) -> Self
       where T: Clone { ... }
}

Provided Methods§

Source

fn from_array(value: [T; N]) -> Self

Source

fn from_fn<F>(f: F) -> Self
where F: FnMut(usize) -> T,

Source

fn splat(val: T) -> Self
where T: Clone,

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.

Implementors§

Source§

impl<C, T, const N: usize> FromArray<T, N> for C
where C: From<[T; N]>,