Trait TensorKind
pub trait TensorKind:
Sealed
+ Clone
+ Send
+ Sync
+ Debug {
const KIND: Kind;
// Provided method
fn name() -> &'static str { ... }
}Expand description
A type-level representation of the kind of a tensor. Metadata access is lazy.
§Notes
This trait is intentionally sealed to keep the set of tensor kinds closed.
Although exposed publicly, tensor kinds are not meant to be extensible:
the backend dispatch system, DType, and all tensor ops assume a fixed,
closed set of tensor kinds (e.g. Float, Int, Bool), each mapping directly to a
corresponding backend implementation.
Required Associated Constants§
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".