pub enum ShapeDim {
Rank0(usize),
Rank1(usize),
Rank2 {
rows: usize,
cols: usize,
},
Rank3 {
x: usize,
y: usize,
z: usize,
},
Rank4 {
a: usize,
b: usize,
c: usize,
d: usize,
},
RankN(Vec<usize>),
Dictionary {
n_keys: usize,
n_values: Vec<usize>,
},
Collection(Vec<ShapeDim>),
Unknown,
}Expand description
Recursively-describable dimensional rank for any Value.
Variants§
Rank0(usize)
Rank-0 - must always be 1
Rank1(usize)
Array row count
Rank2
Relational table with row/column counts.
Rank3
3d object
Rank4
4d Object
RankN(Vec<usize>)
N-dimensional tensor.
Dictionary
Dictionary shape
Collection(Vec<ShapeDim>)
Heterogeneous ordered collection. Covers lists, tuples, cubes (with varying row-counts) and user-custom chunked types.
The order is significant; for tuples it is the fixed arity order.
Unknown
Shape could not be determined.
Trait Implementations§
impl Eq for ShapeDim
Source§impl Shape for ShapeDim
Implement Shape for ShapeDim so recursive calls like item.shape_3d()
compile when iterating Collection(Vec<ShapeDim>).
impl Shape for ShapeDim
Implement Shape for ShapeDim so recursive calls like item.shape_3d()
compile when iterating Collection(Vec<ShapeDim>).
impl StructuralPartialEq for ShapeDim
Auto Trait Implementations§
impl Freeze for ShapeDim
impl RefUnwindSafe for ShapeDim
impl Send for ShapeDim
impl Sync for ShapeDim
impl Unpin for ShapeDim
impl UnsafeUnpin for ShapeDim
impl UnwindSafe for ShapeDim
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