pub unsafe trait Scalar: ScalarOrVector<Scalar = Self> + Sealed { }
Expand description
Abstract trait representing a SPIR-V scalar type, which includes:
- Floating-point type: f32, f64
- Integer type: u8, u16, u32, u64, i8, i16, i32, i64
- Boolean type: bool
See the SPIRV spec on Types.
§Safety
Implementing this trait on non-scalar types breaks assumptions of other unsafe code, and should not be done.
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.