Trait generic_array::sequence::GenericSequence[][src]

pub unsafe trait GenericSequence<T>: Sized + IntoIterator {
    type Length: ArrayLength<T>;
    type Sequence: GenericSequence<T, Length = Self::Length> + FromIterator<T>;
    fn generate<F>(f: F) -> Self::Sequence
    where
        F: FnMut(usize) -> T
; }
Expand description

Defines some sequence with an associated length and iteration capabilities.

This is useful for passing N-length generic arrays as generics.

Associated Types

GenericArray associated length

Concrete sequence type used in conjuction with reference implementations of GenericSequence

Required methods

Initializes a new sequence instance using the given function.

If the generator function panics while initializing the sequence, any already initialized elements will be dropped.

Implementations on Foreign Types

Implementors