pub struct DimDyn(/* private fields */);Expand description
A dynamically-dimensioned shape whose ndim is only known at runtime.
DimDyn stores the shape in a stack-allocated array with capacity NDIM_MAX.
It is the fallback when the number of axes cannot be determined at compile
time: arrays loaded from files, operations that take &[usize] axis arguments, and
dimension-changing operations applied to a DimDyn array all produce DimDyn.
DimDyn::Smaller = DimDyn and DimDyn::Larger = DimDyn: the dimension type stays
dynamic through any chain of shape-changing operations. Use
Array::into_dim to recover a static Dim<N> when the ndim
becomes known.
Trait Implementations§
Source§impl Dimension for DimDyn
impl Dimension for DimDyn
Source§type Vec<T> = ArrayVec<T, NDIM_MAX>
type Vec<T> = ArrayVec<T, NDIM_MAX>
A vec-like container that can hold one value per axis for this dimension type.
Source§fn as_mut_slice(&mut self) -> &mut [u64]
fn as_mut_slice(&mut self) -> &mut [u64]
Return the shape as a mutable slice, with one element per dimension.
Source§fn vec<T>(ndim: usize, f: impl FnMut(usize) -> T) -> Self::Vec<T>
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.Auto Trait Implementations§
impl Freeze for DimDyn
impl RefUnwindSafe for DimDyn
impl Send for DimDyn
impl Sync for DimDyn
impl Unpin for DimDyn
impl UnsafeUnpin for DimDyn
impl UnwindSafe for DimDyn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<D> IntoDimension for Dwhere
D: Dimension,
impl<D> IntoDimension for Dwhere
D: Dimension,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ShapeArg for Twhere
T: IntoDimension,
impl<T> ShapeArg for Twhere
T: IntoDimension,
Source§impl<T> ShapeBuilder for Twhere
T: IntoDimension,
impl<T> ShapeBuilder for Twhere
T: IntoDimension,
Source§type Dim = <T as IntoDimension>::Dim
type Dim = <T as IntoDimension>::Dim
The type that captures the built shape’s dimensionality.
Source§fn into_shape_with_order(self) -> Shape<<T as ShapeBuilder>::Dim>
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>
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>
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>
fn strides(self, st: T) -> StrideShape<<T as ShapeBuilder>::Dim>
Set the strides of the shape.