Trait MewBuffer

Source
pub trait MewBuffer {
    type Inner;

    // Required methods
    fn new(buffer: Buffer) -> Self;
    fn binding_type() -> BindingType;
    fn buffer_desc(inner_size: u64) -> BufferDescriptor<'static>;
    fn as_binding<'a>(&'a self) -> BindingResource<'a>;
}
Expand description

Trait for buffer wrapper types, to get layouts and descriptors about the inner buffer.

Required Associated Types§

Required Methods§

Source

fn new(buffer: Buffer) -> Self

Wrap a buffer in this struct.

Source

fn binding_type() -> BindingType

Get the binding type info.

Source

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

Get a buffer descriptor big enough to fit some number of Self::Inners.

Source

fn as_binding<'a>(&'a self) -> BindingResource<'a>

Get the bindable resource of the buffer.

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§