pub trait MewBuffer {
// 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 Methods§
Sourcefn binding_type() -> BindingType
fn binding_type() -> BindingType
Get the BindingType
for the buffer.
Sourcefn buffer_desc(inner_size: u64) -> BufferDescriptor<'static>
fn buffer_desc(inner_size: u64) -> BufferDescriptor<'static>
Get the ‘BufferDescriptor’ for the buffer, with some count of its internal type as the size.
fn as_binding<'a>(&'a self) -> BindingResource<'a>
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.