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