Skip to main content

IntoNdProducer

Trait IntoNdProducer 

Source
pub trait IntoNdProducer {
    type Item;
    type Dim: Dimension;
    type Output: NdProducer<Dim = Self::Dim, Item = Self::Item>;

    // Required method
    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.

Required Associated Types§

Source

type Item

The element produced per iteration.

Source

type Dim: Dimension

Dimension type of the producer

Source

type Output: NdProducer<Dim = Self::Dim, Item = Self::Item>

The concrete type of the producer

Required Methods§

Source

fn into_producer(self) -> Self::Output

Convert the value into an NdProducer.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, A: 'a, const N: usize> IntoNdProducer for &'a [A; N]

A one-dimensional array is a one-dimensional producer

Source§

impl<'a, A: 'a, const N: usize> IntoNdProducer for &'a mut [A; N]

A mutable one-dimensional array is a mutable one-dimensional producer

Source§

impl<'a, A: 'a> IntoNdProducer for &'a Vec<A>

A Vec is a one-dimensional producer

Source§

impl<'a, A: 'a> IntoNdProducer for &'a [A]

A slice is a one-dimensional producer

Source§

impl<'a, A: 'a> IntoNdProducer for &'a mut Vec<A>

A mutable Vec is a mutable one-dimensional producer

Source§

impl<'a, A: 'a> IntoNdProducer for &'a mut [A]

A mutable slice is a mutable one-dimensional producer

Implementors§

Source§

impl<'a, A: 'a, D> IntoNdProducer for &'a ArrayRef<A, D>
where D: Dimension,

An array reference is an n-dimensional producer of element references (like ArrayView).

Source§

impl<'a, A: 'a, D> IntoNdProducer for &'a mut ArrayRef<A, D>
where D: Dimension,

A mutable array reference is an n-dimensional producer of mutable element references (like ArrayViewMut).

Source§

impl<'a, A: 'a, S, D> IntoNdProducer for &'a ArrayBase<S, D>
where D: Dimension, S: Data<Elem = A>,

An array reference is an n-dimensional producer of element references (like ArrayView).

Source§

impl<'a, A: 'a, S, D> IntoNdProducer for &'a mut ArrayBase<S, D>
where D: Dimension, S: DataMut<Elem = A>,

A mutable array reference is an n-dimensional producer of mutable element references (like ArrayViewMut).

Source§

impl<P> IntoNdProducer for P
where P: NdProducer,

Source§

type Item = <P as NdProducer>::Item

Source§

type Dim = <P as NdProducer>::Dim

Source§

type Output = P