Trait rerun::external::ndarray::NdProducer

source ·
pub trait NdProducer {
    type Item;
    type Dim: Dimension;

    // Required method
    fn raw_dim(&self) -> Self::Dim;
}
Expand description

A producer of an n-dimensional set of elements; for example an array view, mutable array view or an iterator that yields chunks.

Producers are used as a arguments to Zip and azip!().

§Comparison to IntoIterator

Most NdProducers are iterable (implement IntoIterator) but not directly iterators. This separation is needed because the producer represents a multidimensional set of items, it can be split along a particular axis for parallelization, and it has no fixed correspondence to a sequence.

The natural exception is one dimensional producers, like AxisIter, which implement Iterator directly (AxisIter traverses a one dimensional sequence, along an axis, while producing multidimensional items).

See also IntoNdProducer

Required Associated Types§

source

type Item

The element produced per iteration.

source

type Dim: Dimension

Dimension type

Required Methods§

source

fn raw_dim(&self) -> Self::Dim

Return the shape of the producer.

Implementors§

source§

impl<'a, A, D> NdProducer for AxisIter<'a, A, D>
where D: Dimension,

§

type Item = <AxisIter<'a, A, D> as Iterator>::Item

§

type Dim = Dim<[usize; 1]>

source§

impl<'a, A, D> NdProducer for AxisIterMut<'a, A, D>
where D: Dimension,

§

type Item = <AxisIterMut<'a, A, D> as Iterator>::Item

§

type Dim = Dim<[usize; 1]>

source§

impl<'a, A, D> NdProducer for AxisWindows<'a, A, D>
where D: Dimension,

§

type Item = ArrayBase<ViewRepr<&'a A>, D>

§

type Dim = Dim<[usize; 1]>

source§

impl<'a, A, D> NdProducer for ExactChunks<'a, A, D>
where D: Dimension,

§

type Item = ArrayBase<ViewRepr<&'a A>, D>

§

type Dim = D

source§

impl<'a, A, D> NdProducer for ExactChunksMut<'a, A, D>
where D: Dimension,

source§

impl<'a, A, D> NdProducer for Lanes<'a, A, D>
where D: Dimension,

§

type Item = ArrayBase<ViewRepr<&'a A>, Dim<[usize; 1]>>

§

type Dim = D

source§

impl<'a, A, D> NdProducer for LanesMut<'a, A, D>
where D: Dimension,

source§

impl<'a, A, D> NdProducer for Windows<'a, A, D>
where D: Dimension,

§

type Item = ArrayBase<ViewRepr<&'a A>, D>

§

type Dim = D

source§

impl<'a, A, D> NdProducer for ArrayBase<ViewRepr<&'a A>, D>
where D: Dimension,

§

type Item = &'a A

§

type Dim = D

source§

impl<'a, A, D> NdProducer for ArrayBase<ViewRepr<&'a mut A>, D>
where D: Dimension,

§

type Item = &'a mut A

§

type Dim = D

source§

impl<A, D> NdProducer for ArrayBase<RawViewRepr<*const A>, D>
where D: Dimension,

§

type Item = *const A

§

type Dim = D

source§

impl<A, D> NdProducer for ArrayBase<RawViewRepr<*mut A>, D>
where D: Dimension,

§

type Item = *mut A

§

type Dim = D

source§

impl<D> NdProducer for Indices<D>
where D: Dimension + Copy,

§

type Item = <D as Dimension>::Pattern

§

type Dim = D