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
type Length: ArrayLength<T>
type Length: ArrayLength<T>
GenericArray
associated length
type Sequence: GenericSequence<T, Length = Self::Length> + FromIterator<T>
type Sequence: GenericSequence<T, Length = Self::Length> + FromIterator<T>
Concrete sequence type used in conjuction with reference implementations of GenericSequence
Required methods
Implementors
impl<'a, T: 'a, S: GenericSequence<T>> GenericSequence<T> for &'a mut S where
&'a mut S: IntoIterator,
impl<T, N> GenericSequence<T> for GenericArray<T, N> where
N: ArrayLength<T>,
Self: IntoIterator<Item = T>,