[−][src]Trait generic_array::sequence::GenericSequence
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>
GenericArray
associated length
type Sequence: GenericSequence<T, Length = Self::Length> + FromIterator<T>
Concrete sequence type used in conjuction with reference implementations of GenericSequence
Required Methods
fn generate<F>(f: F) -> Self::Sequence where
F: FnMut(usize) -> T,
F: FnMut(usize) -> T,
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.
Implementors
impl<'a, T: 'a, S: GenericSequence<T>> GenericSequence<T> for &'a S where
&'a S: IntoIterator,
[src]
impl<'a, T: 'a, S: GenericSequence<T>> GenericSequence<T> for &'a S where
&'a S: IntoIterator,
type Length = S::Length
type Sequence = S::Sequence
fn generate<F>(f: F) -> Self::Sequence where
F: FnMut(usize) -> T,
[src]
fn generate<F>(f: F) -> Self::Sequence where
F: FnMut(usize) -> T,
impl<'a, T: 'a, S: GenericSequence<T>> GenericSequence<T> for &'a mut S where
&'a mut S: IntoIterator,
[src]
impl<'a, T: 'a, S: GenericSequence<T>> GenericSequence<T> for &'a mut S where
&'a mut S: IntoIterator,
type Length = S::Length
type Sequence = S::Sequence
fn generate<F>(f: F) -> Self::Sequence where
F: FnMut(usize) -> T,
[src]
fn generate<F>(f: F) -> Self::Sequence where
F: FnMut(usize) -> T,
impl<T, N> GenericSequence<T> for GenericArray<T, N> where
N: ArrayLength<T>,
Self: IntoIterator<Item = T>,
[src]
impl<T, N> GenericSequence<T> for GenericArray<T, N> where
N: ArrayLength<T>,
Self: IntoIterator<Item = T>,