Trait spirv_std::vector::VectorOrScalar
source · pub unsafe trait VectorOrScalar: Default {
type Scalar: Scalar;
const DIM: NonZeroUsize;
}
Expand description
Abstract trait representing either a vector or a scalar type.
§Safety
Implementing this trait on non-scalar or non-vector types may break assumptions about other unsafe code, and should not be done.
Required Associated Types§
Required Associated Constants§
sourceconst DIM: NonZeroUsize
const DIM: NonZeroUsize
The dimension of the vector, or 1 if it is a scalar
Object Safety§
This trait is not object safe.