pub trait DType:
Debug
+ Clone
+ DTypeOps
+ Send
+ Sync
+ MaybeNeg
+ DeviceReprLike
+ 'static {
const ZERO: Self;
const ONE: Self;
const C_NAME: &'static str;
const C_DEP: Option<&'static str>;
const INTEGRAL: bool;
// Required methods
fn to_f64(&self) -> f64;
fn from_f64(x: f64) -> Self;
}Expand description
Marker trait for tensor datatypes.
Required Associated Constants§
const ZERO: Self
const ONE: Self
const C_NAME: &'static str
const C_DEP: Option<&'static str>
const INTEGRAL: bool
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.