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§

source

type Scalar: Scalar

Either the scalar component type of the vector or the scalar itself.

Required Associated Constants§

source

const DIM: NonZeroUsize

The dimension of the vector, or 1 if it is a scalar

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl VectorOrScalar for bool

source§

impl VectorOrScalar for f32

source§

impl VectorOrScalar for f64

source§

impl VectorOrScalar for i8

source§

impl VectorOrScalar for i16

source§

impl VectorOrScalar for i32

source§

impl VectorOrScalar for i64

source§

impl VectorOrScalar for u8

source§

impl VectorOrScalar for u16

source§

impl VectorOrScalar for u32

source§

impl VectorOrScalar for u64

source§

impl VectorOrScalar for Vec3A

source§

impl VectorOrScalar for Vec4

source§

impl VectorOrScalar for Vec2

source§

impl VectorOrScalar for Vec3

source§

impl VectorOrScalar for DVec2

source§

impl VectorOrScalar for DVec3

source§

impl VectorOrScalar for DVec4

source§

impl VectorOrScalar for IVec2

source§

impl VectorOrScalar for IVec3

source§

impl VectorOrScalar for IVec4

source§

impl VectorOrScalar for UVec2

source§

impl VectorOrScalar for UVec3

source§

impl VectorOrScalar for UVec4

Implementors§