pub trait TensorScalar:
Scalar
+ Copy
+ Clone
+ Send
+ Sync
+ 'static
+ Sealed {
type Real: TensorScalar;
// Required method
fn dtype() -> DType;
}Expand description
Sealed trait for scalar types supported by the core tensor data model.
§Examples
use tenferro_tensor_core::{DType, TensorScalar};
assert_eq!(f64::dtype(), DType::F64);
assert_eq!(num_complex::Complex64::dtype(), DType::C64);Required Associated Types§
Sourcetype Real: TensorScalar
type Real: TensorScalar
Real-valued counterpart of this scalar type.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".