pub trait PipeLineLayout: Pod + Zeroable {
// Required method
fn create_layout(
&self,
gpu_device: &mut GpuDevice,
layouts: &mut LayoutStorage,
surface_format: TextureFormat,
) -> RenderPipeline;
// Provided method
fn layout_key(&self) -> (TypeId, Vec<u8>) { ... }
}Expand description
Trait used to Create and Load wgpu::RenderPipeline to and from a HashMap.
Required Methods§
Sourcefn create_layout(
&self,
gpu_device: &mut GpuDevice,
layouts: &mut LayoutStorage,
surface_format: TextureFormat,
) -> RenderPipeline
fn create_layout( &self, gpu_device: &mut GpuDevice, layouts: &mut LayoutStorage, surface_format: TextureFormat, ) -> RenderPipeline
Creates the wgpu::RenderPipeline 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::RenderPipeline 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", so this trait is not object safe.