Skip to main content

Layout

Trait Layout 

Source
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§

Source

fn create_layout(&self, gpu_device: &mut GpuDevice) -> BindGroupLayout

Creates the wgpu::BindGroupLayout to be added to the HashMap

Provided Methods§

Source

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".

Implementors§