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