Skip to main content

MewBuffer

Trait MewBuffer 

Source
pub trait MewBuffer {
    type Inner;

    // Required methods
    fn new(buffer: Buffer) -> Self;
    fn buffer_desc(inner_size: u64) -> BufferDescriptor<'static>;
}
Expand description

Trait for internal use to work with buffers.

Required Associated Types§

Source

type Inner

The “inner” type - what the buffer is supposed to hold. When creating buffers their capacity in bytes will be the input size times the size of this struct.

Required Methods§

Source

fn new(buffer: Buffer) -> Self

Build this buffer type from a wgpu::Buffer.

Source

fn buffer_desc(inner_size: u64) -> BufferDescriptor<'static>

Get a wgpu::BufferDescriptor to build this type of buffer, with the capacity to fit some number of Self::Inners.

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.

Implementors§