spirv_std::image

Trait SampleType

Source
pub trait SampleType<const FORMAT: u32, const COMPONENTS: u32>: Scalar {
    type SampleResult: Default;
    type Vec2: Default;
    type Vec3: Default;
    type Vec4: Default + VectorTruncateInto<Self::SampleResult>;
}
Expand description

Marker trait for arguments that accept single scalar values or vectors of scalars. Defines 2-, 3- and 4-component vector types based on the sample type.

Required Associated Types§

Source

type SampleResult: Default

The default vector/scalar of this sample type

Source

type Vec2: Default

A 2-component vector of this sample type

Source

type Vec3: Default

A 3-component vector of this sample type

Source

type Vec4: Default + VectorTruncateInto<Self::SampleResult>

A 4-component vector of this sample type

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.

Implementations on Foreign Types§

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for f64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for i8

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for i16

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for i64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for i64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for u8

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for u16

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for u64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 1> for u64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for f64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for i8

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for i16

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for i64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for u8

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for u16

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 2> for u64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for f64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for i8

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for i16

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for i64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for u8

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for u16

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 3> for u64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for f32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for f64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for i8

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for i16

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for i32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for i64

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for u8

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for u16

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for u32

Source§

impl SampleType<{ ImageFormat::$fmt as u32 }, 4> for u64

Implementors§