pub trait Shape:
Copy
+ Debug
+ Default
+ Send
+ Sync {
type Head: Dim;
type Tail: Shape;
type Reverse: Shape;
type Prepend<D: Dim>: Shape;
type Merge<S: Shape>: Shape;
type FromExpr<T>: FromExpression<T, Self>;
type Layout<L: Layout, M: Layout>: Layout;
type Dims: Dims;
type Strides: Strides;
const RANK: usize;
// Required methods
fn dims(self) -> Self::Dims;
fn from_dims(dims: Self::Dims) -> Self;
// Provided methods
fn dim(self, index: usize) -> usize { ... }
fn is_empty(self) -> bool { ... }
fn len(self) -> usize { ... }
fn rank(self) -> usize { ... }
}Expand description
Array shape trait.
Required Associated Types§
sourcetype Merge<S: Shape>: Shape
type Merge<S: Shape>: Shape
Merge each dimension pair, where constant size is preferred over dynamic. The result has dynamic rank if at least one of the inputs has dynamic rank.
sourcetype FromExpr<T>: FromExpression<T, Self>
type FromExpr<T>: FromExpression<T, Self>
The resulting type after conversion from an expression.
Required Associated Constants§
Required Methods§
Provided Methods§
Object Safety§
This trait is not object safe.