Trait ndarray::SliceArg[][src]

pub unsafe trait SliceArg<D: Dimension>: AsRef<[SliceInfoElem]> {
    type OutDim: Dimension;
    fn in_ndim(&self) -> usize;
fn out_ndim(&self) -> usize;
fn __private__(&self) -> PrivateMarker; }

A type that can slice an array of dimension D.

This trait is unsafe to implement because the implementation must ensure that D, Self::OutDim, self.in_dim(), and self.out_ndim() are consistent with the &[SliceInfoElem] returned by self.as_ref() and that self.as_ref() always returns the same value when called multiple times.

Associated Types

type OutDim: Dimension[src]

Dimensionality of the output array.

Loading content...

Required methods

fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate.

Loading content...

Implementations on Foreign Types

impl<T: ?Sized, D> SliceArg<D> for &T where
    T: SliceArg<D>,
    D: Dimension
[src]

type OutDim = T::OutDim

impl SliceArg<Dim<IxDynImpl>> for [SliceInfoElem][src]

type OutDim = IxDyn

Loading content...

Implementors

impl<T, Din, Dout> SliceArg<Dim<IxDynImpl>> for SliceInfo<T, Din, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Din: Dimension,
    Dout: Dimension
[src]

type OutDim = Dout

impl<T, Dout> SliceArg<Dim<[usize; 0]>> for SliceInfo<T, Ix0, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

impl<T, Dout> SliceArg<Dim<[usize; 1]>> for SliceInfo<T, Ix1, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

impl<T, Dout> SliceArg<Dim<[usize; 2]>> for SliceInfo<T, Ix2, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

impl<T, Dout> SliceArg<Dim<[usize; 3]>> for SliceInfo<T, Ix3, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

impl<T, Dout> SliceArg<Dim<[usize; 4]>> for SliceInfo<T, Ix4, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

impl<T, Dout> SliceArg<Dim<[usize; 5]>> for SliceInfo<T, Ix5, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

impl<T, Dout> SliceArg<Dim<[usize; 6]>> for SliceInfo<T, Ix6, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

Loading content...