Trait ndarray::IntoNdProducer
[−]
[src]
pub trait IntoNdProducer { type Item; type Dim: Dimension; type Output: NdProducer<Dim = Self::Dim, Item = Self::Item>; fn into_producer(self) -> Self::Output; }
Argument conversion into a producer.
Slices and vectors can be used (equivalent to 1-dimensional array views).
This trait is like IntoIterator
for NdProducers
instead of iterators.
Associated Types
type Item
The element produced per iteration.
type Dim: Dimension
Dimension type of the producer
type Output: NdProducer<Dim = Self::Dim, Item = Self::Item>
Required Methods
fn into_producer(self) -> Self::Output
Convert the value into an NdProducer
.
Implementors
impl<P> IntoNdProducer for P where
P: NdProducer, type Item = P::Item; type Dim = P::Dim; type Output = Self;impl<'a, A: 'a, S, D> IntoNdProducer for &'a ArrayBase<S, D> where
D: Dimension,
S: Data<Elem = A>, type Item = &'a A; type Dim = D; type Output = ArrayView<'a, A, D>;impl<'a, A: 'a, S, D> IntoNdProducer for &'a mut ArrayBase<S, D> where
D: Dimension,
S: DataMut<Elem = A>, type Item = &'a mut A; type Dim = D; type Output = ArrayViewMut<'a, A, D>;impl<'a, A: 'a> IntoNdProducer for &'a [A] type Item = <Self::Output as NdProducer>::Item; type Dim = Ix1; type Output = ArrayView1<'a, A>;
impl<'a, A: 'a> IntoNdProducer for &'a mut [A] type Item = <Self::Output as NdProducer>::Item; type Dim = Ix1; type Output = ArrayViewMut1<'a, A>;
impl<'a, A: 'a> IntoNdProducer for &'a Vec<A> type Item = <Self::Output as NdProducer>::Item; type Dim = Ix1; type Output = ArrayView1<'a, A>;
impl<'a, A: 'a> IntoNdProducer for &'a mut Vec<A> type Item = <Self::Output as NdProducer>::Item; type Dim = Ix1; type Output = ArrayViewMut1<'a, A>;