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§

source

fn build(&self, strategy: WgslTypeSerializeStrategy) -> WgslTypeMap

Builds the WgslTypeMap based on the given serialization strategy.

Trait Implementations§

source§

impl Default for Box<dyn WgslTypeMapBuild>

source§

fn default() -> Self

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

impl<T: WgslTypeMapBuild + 'static> From<T> for Box<dyn WgslTypeMapBuild>

source§

fn from(value: T) -> Self

Converts to this type from the input type.

Implementors§