pub trait Layout: Pod + Zeroable {
// Required method
fn create_layout(&self, gpu_device: &mut GpuDevice) -> BindGroupLayout;
// Provided method
fn layout_key(&self) -> (TypeId, Vec<u8>) { ... }
}Expand description
Trait used to Create and Store wgpu::BindGroupLayout within a HashMap.
Required Methods§
Sourcefn create_layout(&self, gpu_device: &mut GpuDevice) -> BindGroupLayout
fn create_layout(&self, gpu_device: &mut GpuDevice) -> BindGroupLayout
Creates the wgpu::BindGroupLayout to be added to the HashMap
Provided Methods§
Sourcefn layout_key(&self) -> (TypeId, Vec<u8>)
fn layout_key(&self) -> (TypeId, Vec<u8>)
Gives a Hashable Key of the wgpu::BindGroupLayout to use to Retrieve it from the HashMap.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".