pub trait IntoDScalar: LinalgScalar + PartialEq {
const DTYPE: DType;
// Required methods
fn to_dscalar(&self) -> DScalar;
fn from_dscalar(scalar: DScalar) -> Option<Self>;
fn vec_to_dtensor(data: Vec<Self>) -> DTensor;
}
Required Associated Constants§
Required Methods§
fn to_dscalar(&self) -> DScalar
fn from_dscalar(scalar: DScalar) -> Option<Self>
fn vec_to_dtensor(data: Vec<Self>) -> DTensor
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.