pub trait Scalar:
Copy
+ Send
+ Sync
+ 'static {
// Required method
fn to_f32(&self) -> f32;
}Expand description
A scalar value usable in tensors. Every scalar projects to
f32 for cross-backend interop.
Backends pick their own concrete scalar set; the framework
ships universal primitive impls for f32 + f64 only.
Concrete backends may add impls for i32, i64, u32, u64,
bool, f16 (bf16, fp8 variants), etc.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".