Skip to main content

Dim

Struct Dim 

Source
pub struct Dim<const NDIM: usize>(/* private fields */);
Expand description

A statically-dimensioned shape with exactly NDIM axes, known at compile time.

Dim<N> is the preferred dimension type when the number of axes is determined by the code structure rather than runtime data. Passing typed arguments to shape-manipulating operations (e.g. [u64; 2] to reshape, usize to insert_axis) causes the compiler to select Dim<N> automatically, so callers rarely need to name this type explicitly.

§Neighbors

Dim<N>::Smaller = Dim<N-1> (for N >= 1; Dim<0>::Smaller = DimDyn). Dim<N>::Larger = Dim<N+1> (for N <= 7; Dim<8>::Larger = DimDyn).

This means that N consecutive insert_axis(0) calls on a Dim<M> array produce a Dim<M+N> result, as long as M + N <= 8.

Implementations§

Source§

impl<const NDIM: usize> Dim<NDIM>

Source

pub fn from_array(arr: [u64; NDIM]) -> Self

Construct a Dim<NDIM> from a fixed-size array of axis sizes.

Trait Implementations§

Source§

impl<const NDIM: usize> Clone for Dim<NDIM>

Source§

fn clone(&self) -> Dim<NDIM>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Dim<0>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Debug for Dim<1>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Debug for Dim<2>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Debug for Dim<3>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Debug for Dim<4>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Debug for Dim<5>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Debug for Dim<6>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Debug for Dim<7>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Debug for Dim<8>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Dimension for Dim<0>

Source§

const NDIM: Option<usize>

The number of axes, if known at compile time. Read more
Source§

type Smaller = DimDyn

The dimension type that results from removing one axis. Read more
Source§

type Larger = Dim<1>

The dimension type that results from adding one axis. Read more
Source§

type Index<'a> = ()

The type of the index pattern for this dimension. Read more
Source§

type Vec<T> = [T; 0]

A vec-like container that can hold one value per axis for this dimension type.
Source§

fn from_fn(ndim: usize, f: impl FnMut(usize) -> u64) -> Self

Construct a Dimension by calling f(i) for each axis index i in 0..ndim. Read more
Source§

fn as_slice(&self) -> &[u64]

Return the shape as a slice, with one element per dimension.
Source§

fn as_mut_slice(&mut self) -> &mut [u64]

Return the shape as a mutable slice, with one element per dimension.
Source§

fn to_index(&self) -> Self::Index<'_>

Convert the dimension into its index pattern type.
Source§

fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>

Build a vec-like container with one value per axis, by applying f to each axis index.
Source§

fn from_slice(slice: &[u64]) -> Self
where Self: Sized,

Construct a Dimension value from a shape slice. Read more
Source§

fn ndim(&self) -> usize

Return the number of dimensions. Read more
Source§

fn size(&self, dim: usize) -> u64

Return the size of dimension dim. Read more
Source§

impl Dimension for Dim<1>

Source§

const NDIM: Option<usize>

The number of axes, if known at compile time. Read more
Source§

type Smaller = Dim<{ $dim - 1 }>

The dimension type that results from removing one axis. Read more
Source§

type Larger = Dim<{ $dim + 1 }>

The dimension type that results from adding one axis. Read more
Source§

type Index<'a> = u64

The type of the index pattern for this dimension. Read more
Source§

type Vec<T> = [T; 1]

A vec-like container that can hold one value per axis for this dimension type.
Source§

fn from_fn(ndim: usize, f: impl FnMut(usize) -> u64) -> Self

Construct a Dimension by calling f(i) for each axis index i in 0..ndim. Read more
Source§

fn as_slice(&self) -> &[u64]

Return the shape as a slice, with one element per dimension.
Source§

fn as_mut_slice(&mut self) -> &mut [u64]

Return the shape as a mutable slice, with one element per dimension.
Source§

fn to_index(&self) -> Self::Index<'_>

Convert the dimension into its index pattern type.
Source§

fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>

Build a vec-like container with one value per axis, by applying f to each axis index.
Source§

fn from_slice(slice: &[u64]) -> Self
where Self: Sized,

Construct a Dimension value from a shape slice. Read more
Source§

fn ndim(&self) -> usize

Return the number of dimensions. Read more
Source§

fn size(&self, dim: usize) -> u64

Return the size of dimension dim. Read more
Source§

impl Dimension for Dim<2>

Source§

const NDIM: Option<usize>

The number of axes, if known at compile time. Read more
Source§

type Smaller = Dim<{ $dim - 1 }>

The dimension type that results from removing one axis. Read more
Source§

type Larger = Dim<{ $dim + 1 }>

The dimension type that results from adding one axis. Read more
Source§

type Index<'a> = (u64, u64)

The type of the index pattern for this dimension. Read more
Source§

type Vec<T> = [T; 2]

A vec-like container that can hold one value per axis for this dimension type.
Source§

fn from_fn(ndim: usize, f: impl FnMut(usize) -> u64) -> Self

Construct a Dimension by calling f(i) for each axis index i in 0..ndim. Read more
Source§

fn as_slice(&self) -> &[u64]

Return the shape as a slice, with one element per dimension.
Source§

fn as_mut_slice(&mut self) -> &mut [u64]

Return the shape as a mutable slice, with one element per dimension.
Source§

fn to_index(&self) -> Self::Index<'_>

Convert the dimension into its index pattern type.
Source§

fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>

Build a vec-like container with one value per axis, by applying f to each axis index.
Source§

fn from_slice(slice: &[u64]) -> Self
where Self: Sized,

Construct a Dimension value from a shape slice. Read more
Source§

fn ndim(&self) -> usize

Return the number of dimensions. Read more
Source§

fn size(&self, dim: usize) -> u64

Return the size of dimension dim. Read more
Source§

impl Dimension for Dim<3>

Source§

const NDIM: Option<usize>

The number of axes, if known at compile time. Read more
Source§

type Smaller = Dim<{ $dim - 1 }>

The dimension type that results from removing one axis. Read more
Source§

type Larger = Dim<{ $dim + 1 }>

The dimension type that results from adding one axis. Read more
Source§

type Index<'a> = (u64, u64, u64)

The type of the index pattern for this dimension. Read more
Source§

type Vec<T> = [T; 3]

A vec-like container that can hold one value per axis for this dimension type.
Source§

fn from_fn(ndim: usize, f: impl FnMut(usize) -> u64) -> Self

Construct a Dimension by calling f(i) for each axis index i in 0..ndim. Read more
Source§

fn as_slice(&self) -> &[u64]

Return the shape as a slice, with one element per dimension.
Source§

fn as_mut_slice(&mut self) -> &mut [u64]

Return the shape as a mutable slice, with one element per dimension.
Source§

fn to_index(&self) -> Self::Index<'_>

Convert the dimension into its index pattern type.
Source§

fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>

Build a vec-like container with one value per axis, by applying f to each axis index.
Source§

fn from_slice(slice: &[u64]) -> Self
where Self: Sized,

Construct a Dimension value from a shape slice. Read more
Source§

fn ndim(&self) -> usize

Return the number of dimensions. Read more
Source§

fn size(&self, dim: usize) -> u64

Return the size of dimension dim. Read more
Source§

impl Dimension for Dim<4>

Source§

const NDIM: Option<usize>

The number of axes, if known at compile time. Read more
Source§

type Smaller = Dim<{ $dim - 1 }>

The dimension type that results from removing one axis. Read more
Source§

type Larger = Dim<{ $dim + 1 }>

The dimension type that results from adding one axis. Read more
Source§

type Index<'a> = (u64, u64, u64, u64)

The type of the index pattern for this dimension. Read more
Source§

type Vec<T> = [T; 4]

A vec-like container that can hold one value per axis for this dimension type.
Source§

fn from_fn(ndim: usize, f: impl FnMut(usize) -> u64) -> Self

Construct a Dimension by calling f(i) for each axis index i in 0..ndim. Read more
Source§

fn as_slice(&self) -> &[u64]

Return the shape as a slice, with one element per dimension.
Source§

fn as_mut_slice(&mut self) -> &mut [u64]

Return the shape as a mutable slice, with one element per dimension.
Source§

fn to_index(&self) -> Self::Index<'_>

Convert the dimension into its index pattern type.
Source§

fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>

Build a vec-like container with one value per axis, by applying f to each axis index.
Source§

fn from_slice(slice: &[u64]) -> Self
where Self: Sized,

Construct a Dimension value from a shape slice. Read more
Source§

fn ndim(&self) -> usize

Return the number of dimensions. Read more
Source§

fn size(&self, dim: usize) -> u64

Return the size of dimension dim. Read more
Source§

impl Dimension for Dim<5>

Source§

const NDIM: Option<usize>

The number of axes, if known at compile time. Read more
Source§

type Smaller = Dim<{ $dim - 1 }>

The dimension type that results from removing one axis. Read more
Source§

type Larger = Dim<{ $dim + 1 }>

The dimension type that results from adding one axis. Read more
Source§

type Index<'a> = (u64, u64, u64, u64, u64)

The type of the index pattern for this dimension. Read more
Source§

type Vec<T> = [T; 5]

A vec-like container that can hold one value per axis for this dimension type.
Source§

fn from_fn(ndim: usize, f: impl FnMut(usize) -> u64) -> Self

Construct a Dimension by calling f(i) for each axis index i in 0..ndim. Read more
Source§

fn as_slice(&self) -> &[u64]

Return the shape as a slice, with one element per dimension.
Source§

fn as_mut_slice(&mut self) -> &mut [u64]

Return the shape as a mutable slice, with one element per dimension.
Source§

fn to_index(&self) -> Self::Index<'_>

Convert the dimension into its index pattern type.
Source§

fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>

Build a vec-like container with one value per axis, by applying f to each axis index.
Source§

fn from_slice(slice: &[u64]) -> Self
where Self: Sized,

Construct a Dimension value from a shape slice. Read more
Source§

fn ndim(&self) -> usize

Return the number of dimensions. Read more
Source§

fn size(&self, dim: usize) -> u64

Return the size of dimension dim. Read more
Source§

impl Dimension for Dim<6>

Source§

const NDIM: Option<usize>

The number of axes, if known at compile time. Read more
Source§

type Smaller = Dim<{ $dim - 1 }>

The dimension type that results from removing one axis. Read more
Source§

type Larger = Dim<{ $dim + 1 }>

The dimension type that results from adding one axis. Read more
Source§

type Index<'a> = (u64, u64, u64, u64, u64, u64)

The type of the index pattern for this dimension. Read more
Source§

type Vec<T> = [T; 6]

A vec-like container that can hold one value per axis for this dimension type.
Source§

fn from_fn(ndim: usize, f: impl FnMut(usize) -> u64) -> Self

Construct a Dimension by calling f(i) for each axis index i in 0..ndim. Read more
Source§

fn as_slice(&self) -> &[u64]

Return the shape as a slice, with one element per dimension.
Source§

fn as_mut_slice(&mut self) -> &mut [u64]

Return the shape as a mutable slice, with one element per dimension.
Source§

fn to_index(&self) -> Self::Index<'_>

Convert the dimension into its index pattern type.
Source§

fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>

Build a vec-like container with one value per axis, by applying f to each axis index.
Source§

fn from_slice(slice: &[u64]) -> Self
where Self: Sized,

Construct a Dimension value from a shape slice. Read more
Source§

fn ndim(&self) -> usize

Return the number of dimensions. Read more
Source§

fn size(&self, dim: usize) -> u64

Return the size of dimension dim. Read more
Source§

impl Dimension for Dim<7>

Source§

const NDIM: Option<usize>

The number of axes, if known at compile time. Read more
Source§

type Smaller = Dim<{ $dim - 1 }>

The dimension type that results from removing one axis. Read more
Source§

type Larger = Dim<{ $dim + 1 }>

The dimension type that results from adding one axis. Read more
Source§

type Index<'a> = (u64, u64, u64, u64, u64, u64, u64)

The type of the index pattern for this dimension. Read more
Source§

type Vec<T> = [T; 7]

A vec-like container that can hold one value per axis for this dimension type.
Source§

fn from_fn(ndim: usize, f: impl FnMut(usize) -> u64) -> Self

Construct a Dimension by calling f(i) for each axis index i in 0..ndim. Read more
Source§

fn as_slice(&self) -> &[u64]

Return the shape as a slice, with one element per dimension.
Source§

fn as_mut_slice(&mut self) -> &mut [u64]

Return the shape as a mutable slice, with one element per dimension.
Source§

fn to_index(&self) -> Self::Index<'_>

Convert the dimension into its index pattern type.
Source§

fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>

Build a vec-like container with one value per axis, by applying f to each axis index.
Source§

fn from_slice(slice: &[u64]) -> Self
where Self: Sized,

Construct a Dimension value from a shape slice. Read more
Source§

fn ndim(&self) -> usize

Return the number of dimensions. Read more
Source§

fn size(&self, dim: usize) -> u64

Return the size of dimension dim. Read more
Source§

impl Dimension for Dim<8>

Source§

const NDIM: Option<usize>

The number of axes, if known at compile time. Read more
Source§

type Smaller = Dim<7>

The dimension type that results from removing one axis. Read more
Source§

type Larger = DimDyn

The dimension type that results from adding one axis. Read more
Source§

type Index<'a> = (u64, u64, u64, u64, u64, u64, u64, u64)

The type of the index pattern for this dimension. Read more
Source§

type Vec<T> = [T; 8]

A vec-like container that can hold one value per axis for this dimension type.
Source§

fn from_fn(ndim: usize, f: impl FnMut(usize) -> u64) -> Self

Construct a Dimension by calling f(i) for each axis index i in 0..ndim. Read more
Source§

fn as_slice(&self) -> &[u64]

Return the shape as a slice, with one element per dimension.
Source§

fn as_mut_slice(&mut self) -> &mut [u64]

Return the shape as a mutable slice, with one element per dimension.
Source§

fn to_index(&self) -> Self::Index<'_>

Convert the dimension into its index pattern type.
Source§

fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>

Build a vec-like container with one value per axis, by applying f to each axis index.
Source§

fn from_slice(slice: &[u64]) -> Self
where Self: Sized,

Construct a Dimension value from a shape slice. Read more
Source§

fn ndim(&self) -> usize

Return the number of dimensions. Read more
Source§

fn size(&self, dim: usize) -> u64

Return the size of dimension dim. Read more
Source§

impl Index<usize> for Dim<0>

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<usize> for Dim<1>

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<usize> for Dim<2>

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<usize> for Dim<3>

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<usize> for Dim<4>

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<usize> for Dim<5>

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<usize> for Dim<6>

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<usize> for Dim<7>

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl Index<usize> for Dim<8>

Source§

type Output = u64

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Dim<0>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Dim<1>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Dim<2>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Dim<3>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Dim<4>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Dim<5>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Dim<6>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Dim<7>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IndexMut<usize> for Dim<8>

Source§

fn index_mut(&mut self, index: usize) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
Source§

impl IntoDimension for Dim<0>

Source§

type Dim = Dim<[usize; 0]>

The concrete type of the resultant dimension.
Source§

fn into_dimension(self) -> Self::Dim

Convert into a type that implements Dimension.
Source§

impl IntoDimension for Dim<1>

Source§

type Dim = Dim<[usize; 1]>

The concrete type of the resultant dimension.
Source§

fn into_dimension(self) -> Self::Dim

Convert into a type that implements Dimension.
Source§

impl IntoDimension for Dim<2>

Source§

type Dim = Dim<[usize; 2]>

The concrete type of the resultant dimension.
Source§

fn into_dimension(self) -> Self::Dim

Convert into a type that implements Dimension.
Source§

impl IntoDimension for Dim<3>

Source§

type Dim = Dim<[usize; 3]>

The concrete type of the resultant dimension.
Source§

fn into_dimension(self) -> Self::Dim

Convert into a type that implements Dimension.
Source§

impl IntoDimension for Dim<4>

Source§

type Dim = Dim<[usize; 4]>

The concrete type of the resultant dimension.
Source§

fn into_dimension(self) -> Self::Dim

Convert into a type that implements Dimension.
Source§

impl IntoDimension for Dim<5>

Source§

type Dim = Dim<[usize; 5]>

The concrete type of the resultant dimension.
Source§

fn into_dimension(self) -> Self::Dim

Convert into a type that implements Dimension.
Source§

impl IntoDimension for Dim<6>

Source§

type Dim = Dim<[usize; 6]>

The concrete type of the resultant dimension.
Source§

fn into_dimension(self) -> Self::Dim

Convert into a type that implements Dimension.
Source§

impl IntoDimension for Dim<7>

Source§

type Dim = Dim<IxDynImpl>

The concrete type of the resultant dimension.
Source§

fn into_dimension(self) -> Self::Dim

Convert into a type that implements Dimension.
Source§

impl IntoDimension for Dim<8>

Source§

type Dim = Dim<IxDynImpl>

The concrete type of the resultant dimension.
Source§

fn into_dimension(self) -> Self::Dim

Convert into a type that implements Dimension.

Auto Trait Implementations§

§

impl<const NDIM: usize> Freeze for Dim<NDIM>
where [u64; NDIM]: Freeze,

§

impl<const NDIM: usize> RefUnwindSafe for Dim<NDIM>

§

impl<const NDIM: usize> Send for Dim<NDIM>
where [u64; NDIM]: Send,

§

impl<const NDIM: usize> Sync for Dim<NDIM>
where [u64; NDIM]: Sync,

§

impl<const NDIM: usize> Unpin for Dim<NDIM>
where [u64; NDIM]: Unpin,

§

impl<const NDIM: usize> UnsafeUnpin for Dim<NDIM>
where [u64; NDIM]: UnsafeUnpin,

§

impl<const NDIM: usize> UnwindSafe for Dim<NDIM>
where [u64; NDIM]: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<D> IntoDimension for D
where D: Dimension,

Source§

type Dimension = D

The Dimension type produced by this conversion.
Source§

fn into_dimension(self) -> Result<<D as IntoDimension>::Dimension, Error>

Convert self into a Dimension value. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ShapeArg for T
where T: IntoDimension,

Source§

type Dim = <T as IntoDimension>::Dim

The type that captures the shape’s dimensionality.
Source§

fn into_shape_and_order(self) -> (<T as ShapeArg>::Dim, Option<Order>)

Convert the argument into a shape and an Order.
Source§

impl<T> ShapeBuilder for T
where T: IntoDimension,

Source§

type Dim = <T as IntoDimension>::Dim

The type that captures the built shape’s dimensionality.
Source§

type Strides = T

The type that captures the built shape’s stride pattern.
Source§

fn into_shape_with_order(self) -> Shape<<T as ShapeBuilder>::Dim>

Turn into a contiguous-element Shape.
Source§

fn f(self) -> Shape<<T as ShapeBuilder>::Dim>

Convert into a Fortran-order (a.k.a., column-order) Shape.
Source§

fn set_f(self, is_f: bool) -> Shape<<T as ShapeBuilder>::Dim>

Set the order of the shape to either Fortran or non-Fortran.
Source§

fn strides(self, st: T) -> StrideShape<<T as ShapeBuilder>::Dim>

Set the strides of the shape.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.