Trait array::Array [] [src]

pub trait Array<T> {
    fn from_fn<F>(f: F) -> Self
    where
        F: FnMut(usize) -> T
; fn from_iter<I: Iterator<Item = T>>(iter: I) -> Self
    where
        Self: Sized
, { ... } }

Implemented by arrays of different lengths.

Required Methods

Creates array from a function of each component index.

Provided Methods

Creates an array from an iterator. Will fail if the iterator does not contain enough elements.

Implementors