pub struct WgslBindgenOption {
Show 13 fields pub entry_points: Vec<String>, pub module_import_root: Option<String>, pub emit_rerun_if_change: bool, pub skip_header_comments: bool, pub skip_hash_check: bool, pub serialization_strategy: WgslTypeSerializeStrategy, pub derive_serde: bool, pub shader_source_output_type: WgslShaderSourceOutputType, pub wgsl_type_map: WgslTypeMap, pub output_file: Option<PathBuf>, pub additional_scan_dirs: Vec<AdditionalScanDirectory>, pub ir_capabilities: Option<WgslShaderIRCapabilities>, pub short_constructor: Option<i32>,
}

Fields§

§entry_points: Vec<String>

A vector of entry points to be added. Each entry point is represented as a String.

§module_import_root: Option<String>

The root prefix/namespace if any applied to all shaders given as the entrypoints.

§emit_rerun_if_change: bool

A boolean flag indicating whether to emit a rerun-if-changed directive to Cargo. Defaults to true.

§skip_header_comments: bool

A boolean flag indicating whether to skip header comments. Enabling headers allows to not rerun if contents did not change.

§skip_hash_check: bool

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.

§serialization_strategy: WgslTypeSerializeStrategy

Derive encase::ShaderType for user defined WGSL structs when WgslTypeSerializeStrategy::Encase. else derive bytemuck

§derive_serde: bool

Derive serde::Serialize and serde::Deserialize for user defined WGSL structs when true.

§shader_source_output_type: WgslShaderSourceOutputType

The type of output for the shader source. Defaults to FinalShaderString.

§wgsl_type_map: WgslTypeMap

A mapping operation for WGSL built-in types. This is used to map WGSL built-in types to their corresponding representations.

§output_file: Option<PathBuf>

The output file path for the generated Rust bindings. Defaults to None.

§additional_scan_dirs: Vec<AdditionalScanDirectory>

The additional set of directories to scan for source files.

§ir_capabilities: Option<WgslShaderIRCapabilities>

wgpu::naga::valid::Capabilities The capabilities of naga to support. Defaults to None.

§short_constructor: Option<i32>

Whether to generate short constructor similar to enums instead of new, if parameters are below the specified threshold Defaults to None

Trait Implementations§

source§

impl Debug for WgslBindgenOption

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for WgslBindgenOption

source§

fn default() -> WgslBindgenOption

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more