[−][src]Trait tract_core::internal::tract_ndarray::IntoNdProducer
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
[src]
The element produced per iteration.
type Dim: Dimension
[src]
Dimension type of the producer
type Output: NdProducer
[src]
Required methods
pub fn into_producer(self) -> Self::Output
[src]
Convert the value into an NdProducer
.
Implementations on Foreign Types
impl<'a, A> IntoNdProducer for &'a [A] where
A: 'a,
[src]
A: 'a,
A slice is a one-dimensional producer
type Item = <<&'a [A] as IntoNdProducer>::Output as NdProducer>::Item
type Dim = Dim<[usize; 1]>
type Output = ArrayBase<ViewRepr<&'a A>, Dim<[usize; 1]>>
pub fn into_producer(self) -> <&'a [A] as IntoNdProducer>::Outputⓘ
[src]
impl<'a, A> IntoNdProducer for &'a mut [A] where
A: 'a,
[src]
A: 'a,
A mutable slice is a mutable one-dimensional producer
type Item = <<&'a mut [A] as IntoNdProducer>::Output as NdProducer>::Item
type Dim = Dim<[usize; 1]>
type Output = ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 1]>>
pub fn into_producer(self) -> <&'a mut [A] as IntoNdProducer>::Outputⓘ
[src]
Implementors
impl<'a, A> IntoNdProducer for &'a Vec<A, Global> where
A: 'a,
[src]
A: 'a,
A Vec is a one-dimensional producer
type Item = <<&'a Vec<A, Global> as IntoNdProducer>::Output as NdProducer>::Item
type Dim = Dim<[usize; 1]>
type Output = ArrayBase<ViewRepr<&'a A>, Dim<[usize; 1]>>
pub fn into_producer(self) -> <&'a Vec<A, Global> as IntoNdProducer>::Outputⓘ
[src]
impl<'a, A> IntoNdProducer for &'a mut Vec<A, Global> where
A: 'a,
[src]
A: 'a,
A mutable Vec is a mutable one-dimensional producer
type Item = <<&'a mut Vec<A, Global> as IntoNdProducer>::Output as NdProducer>::Item
type Dim = Dim<[usize; 1]>
type Output = ArrayBase<ViewRepr<&'a mut A>, Dim<[usize; 1]>>
pub fn into_producer(self) -> <&'a mut Vec<A, Global> as IntoNdProducer>::Outputⓘ
[src]
impl<'a, A, S, D> IntoNdProducer for &'a ArrayBase<S, D> where
D: Dimension,
A: 'a,
S: Data<Elem = A>,
[src]
D: Dimension,
A: 'a,
S: Data<Elem = A>,
An array reference is an n-dimensional producer of element references (like ArrayView).
type Item = &'a A
type Dim = D
type Output = ArrayBase<ViewRepr<&'a A>, D>
pub fn into_producer(self) -> <&'a ArrayBase<S, D> as IntoNdProducer>::Output
[src]
impl<'a, A, S, D> IntoNdProducer for &'a mut ArrayBase<S, D> where
D: Dimension,
A: 'a,
S: DataMut<Elem = A>,
[src]
D: Dimension,
A: 'a,
S: DataMut<Elem = A>,
A mutable array reference is an n-dimensional producer of mutable element references (like ArrayViewMut).
type Item = &'a mut A
type Dim = D
type Output = ArrayBase<ViewRepr<&'a mut A>, D>
pub fn into_producer(
self
) -> <&'a mut ArrayBase<S, D> as IntoNdProducer>::Output
[src]
self
) -> <&'a mut ArrayBase<S, D> as IntoNdProducer>::Output
impl<P> IntoNdProducer for P where
P: NdProducer,
[src]
P: NdProducer,