Trait wgsl_bindgen::WgslTypeMapBuild
source · pub trait WgslTypeMapBuild {
// Required method
fn build(&self, strategy: WgslTypeSerializeStrategy) -> WgslTypeMap;
}Expand description
A trait for building WgslType to TokenStream map.
This map is used to convert built-in WGSL types into their corresponding representations in the generated Rust code. The specific format used for matrix and vector types can vary, and the generated types for the same WGSL type may differ in size or alignment.
Implementations of this trait provide a build function that takes a
WgslTypeSerializeStrategy and returns an WgslTypeMap.
Required Methods§
sourcefn build(&self, strategy: WgslTypeSerializeStrategy) -> WgslTypeMap
fn build(&self, strategy: WgslTypeSerializeStrategy) -> WgslTypeMap
Builds the WgslTypeMap based on the given serialization strategy.