@@ -134,6 +134,7 @@ const SPIRV_TARGET_PREFIX: &str = "spirv-unknown-";
134
134
135
135
#[ derive( Debug , PartialEq , Eq , Clone , Copy , Default , serde:: Deserialize , serde:: Serialize ) ]
136
136
#[ cfg_attr( feature = "clap" , derive( clap:: ValueEnum ) ) ]
137
+ #[ non_exhaustive]
137
138
pub enum MetadataPrintout {
138
139
/// Print no cargo metadata.
139
140
#[ default]
@@ -148,6 +149,7 @@ pub enum MetadataPrintout {
148
149
149
150
#[ derive( Debug , PartialEq , Eq , Clone , Copy , Default , serde:: Deserialize , serde:: Serialize ) ]
150
151
#[ cfg_attr( feature = "clap" , derive( clap:: ValueEnum ) ) ]
152
+ #[ non_exhaustive]
151
153
pub enum SpirvMetadata {
152
154
/// Strip all names and other debug information from SPIR-V output.
153
155
#[ default]
@@ -162,6 +164,7 @@ pub enum SpirvMetadata {
162
164
/// Strategy used to handle Rust `panic!`s in shaders compiled to SPIR-V.
163
165
#[ derive( Debug , PartialEq , Eq , Clone , Copy , Default , serde:: Deserialize , serde:: Serialize ) ]
164
166
#[ cfg_attr( feature = "clap" , derive( clap:: ValueEnum ) ) ]
167
+ #[ non_exhaustive]
165
168
pub enum ShaderPanicStrategy {
166
169
/// Return from shader entry-point with no side-effects **(default)**.
167
170
///
@@ -247,6 +250,7 @@ pub enum ShaderPanicStrategy {
247
250
/// Copied from `spirv-tools/src/val.rs` struct `ValidatorOptions`, with some fields disabled.
248
251
#[ derive( Default , Debug , Clone , serde:: Deserialize , serde:: Serialize ) ]
249
252
#[ cfg_attr( feature = "clap" , derive( clap:: Parser ) ) ]
253
+ #[ non_exhaustive]
250
254
pub struct ValidatorOptions {
251
255
/// Record whether or not the validator should relax the rules on types for
252
256
/// stores to structs. When relaxed, it will allow a type mismatch as long as
@@ -323,6 +327,7 @@ pub struct ValidatorOptions {
323
327
/// Copied from `spirv-tools/src/opt.rs` struct `Options`, with some fields disabled.
324
328
#[ derive( Default , Debug , Clone , serde:: Deserialize , serde:: Serialize ) ]
325
329
#[ cfg_attr( feature = "clap" , derive( clap:: Parser ) ) ]
330
+ #[ non_exhaustive]
326
331
pub struct OptimizerOptions {
327
332
// /// Records the validator options that should be passed to the validator,
328
333
// /// the validator will run with the options before optimizer.
@@ -340,6 +345,7 @@ pub struct OptimizerOptions {
340
345
/// Cargo features specification for building the shader crate.
341
346
#[ derive( Clone , Debug , serde:: Deserialize , serde:: Serialize ) ]
342
347
#[ cfg_attr( feature = "clap" , derive( clap:: Parser ) ) ]
348
+ #[ non_exhaustive]
343
349
pub struct ShaderCrateFeatures {
344
350
/// Set --default-features for the target shader crate.
345
351
#[ cfg_attr( feature = "clap" , clap( long = "no-default-features" , default_value = "true" , action = clap:: ArgAction :: SetFalse ) ) ]
@@ -360,6 +366,7 @@ impl Default for ShaderCrateFeatures {
360
366
361
367
#[ derive( Clone , Debug , serde:: Deserialize , serde:: Serialize ) ]
362
368
#[ cfg_attr( feature = "clap" , derive( clap:: Parser ) ) ]
369
+ #[ non_exhaustive]
363
370
pub struct SpirvBuilder {
364
371
#[ cfg_attr( feature = "clap" , clap( skip) ) ]
365
372
pub path_to_crate : Option < PathBuf > ,
0 commit comments