pub trait HostDtype:
Copy
+ Send
+ Sync
+ 'static {
const DTYPE: Dtype;
}Expand description
Marker trait connecting a host element type T to its runtime
Dtype tag. Used by the typed Backend allocator + uploader so the
trait surface has ONE alloc_typed(Dtype, n) /
from_slice_typed<T>(&[T]) / write_typed<T>(buf, &[T]) instead
of the per-dtype-named family (alloc_u32, from_slice_i32,
write_i32_into, write_f32_into, …).
Implemented for all dtypes that backends store in Self::Buffer.
Required Associated Constants§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".