Skip to main content

SpirvTargetVariant

Trait SpirvTargetVariant 

Source
pub trait SpirvTargetVariant {
    // Required methods
    fn validate(&self) -> Result<(), TargetError>;
    fn to_spirv_tools(&self) -> TargetEnv;
    fn spirv_version(&self) -> SpirvVersion;
}
Expand description

A trait to describe common properties between different target variants

Required Methods§

Source

fn validate(&self) -> Result<(), TargetError>

Validate the target version

Source

fn to_spirv_tools(&self) -> TargetEnv

Get the spirv_tools::TargetEnv to use for spirv-val and spirv-opt. May panic if version is invalid.

Source

fn spirv_version(&self) -> SpirvVersion

Get the SpirvVersion of this target. May panic if version is invalid.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§