Struct wgsl_bindgen::WgslBindgenOptionBuilder
source · pub struct WgslBindgenOptionBuilder { /* private fields */ }Expand description
Builder for WgslBindgenOption.
Implementations§
source§impl WgslBindgenOptionBuilder
impl WgslBindgenOptionBuilder
sourcepub fn entry_points<VALUE: Into<Vec<String>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn entry_points<VALUE: Into<Vec<String>>>( &mut self, value: VALUE ) -> &mut Self
A vector of entry points to be added. Each entry point is represented as a String.
sourcepub fn add_entry_point<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE
) -> &mut Self
pub fn add_entry_point<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE ) -> &mut Self
A vector of entry points to be added. Each entry point is represented as a String.
sourcepub fn module_import_root<VALUE: Into<String>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn module_import_root<VALUE: Into<String>>( &mut self, value: VALUE ) -> &mut Self
The root prefix/namespace if any applied to all shaders given as the entrypoints.
sourcepub fn emit_rerun_if_change<VALUE: Into<bool>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn emit_rerun_if_change<VALUE: Into<bool>>( &mut self, value: VALUE ) -> &mut Self
A boolean flag indicating whether to emit a rerun-if-changed directive to Cargo. Defaults to true.
sourcepub fn skip_header_comments<VALUE: Into<bool>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn skip_header_comments<VALUE: Into<bool>>( &mut self, value: VALUE ) -> &mut Self
A boolean flag indicating whether to skip header comments. Enabling headers allows to not rerun if contents did not change.
sourcepub fn skip_hash_check<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn skip_hash_check<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
A boolean flag indicating whether to skip the hash check. This will avoid reruns of bindings generation if
entry shaders including their imports has not changed. Defaults to false.
sourcepub fn serialization_strategy<VALUE: Into<WgslTypeSerializeStrategy>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn serialization_strategy<VALUE: Into<WgslTypeSerializeStrategy>>( &mut self, value: VALUE ) -> &mut Self
Derive encase::ShaderType
for user defined WGSL structs when WgslTypeSerializeStrategy::Encase.
else derive bytemuck
sourcepub fn derive_serde<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn derive_serde<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Derive serde::Serialize
and serde::Deserialize
for user defined WGSL structs when true.
sourcepub fn shader_source_output_type<VALUE: Into<WgslShaderSourceOutputType>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn shader_source_output_type<VALUE: Into<WgslShaderSourceOutputType>>( &mut self, value: VALUE ) -> &mut Self
The type of output for the shader source. Defaults to FinalShaderString.
sourcepub fn output_file<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
pub fn output_file<VALUE: Into<PathBuf>>(&mut self, value: VALUE) -> &mut Self
The output file path for the generated Rust bindings. Defaults to None.
sourcepub fn additional_scan_dirs<VALUE: Into<Vec<AdditionalScanDirectory>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn additional_scan_dirs<VALUE: Into<Vec<AdditionalScanDirectory>>>( &mut self, value: VALUE ) -> &mut Self
The additional set of directories to scan for source files.
sourcepub fn additional_scan_dir<VALUE, FROM_VALUE: Into<VALUE>>(
&mut self,
item: FROM_VALUE
) -> &mut Self
pub fn additional_scan_dir<VALUE, FROM_VALUE: Into<VALUE>>( &mut self, item: FROM_VALUE ) -> &mut Self
The additional set of directories to scan for source files.
sourcepub fn ir_capabilities<VALUE: Into<WgslShaderIRCapabilities>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn ir_capabilities<VALUE: Into<WgslShaderIRCapabilities>>( &mut self, value: VALUE ) -> &mut Self
wgpu::naga::valid::Capabilities
The capabilities of naga to support. Defaults to None.
sourcepub fn short_constructor<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self
pub fn short_constructor<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self
Whether to generate short constructor similar to enums instead of new, if parameters are below the specified threshold
Defaults to None
source§impl WgslBindgenOptionBuilder
impl WgslBindgenOptionBuilder
pub fn build(&self) -> Result<WGSLBindgen, WgslBindgenError>
pub fn wgsl_type_map(&mut self, map_build: impl WgslTypeMapBuild) -> &mut Self
Trait Implementations§
source§impl Clone for WgslBindgenOptionBuilder
impl Clone for WgslBindgenOptionBuilder
source§fn clone(&self) -> WgslBindgenOptionBuilder
fn clone(&self) -> WgslBindgenOptionBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more