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§
Sourcefn binding_type() -> BindingType
fn binding_type() -> BindingType
Get the binding type info.
Sourcefn buffer_desc(inner_size: u64) -> BufferDescriptor<'static>
fn buffer_desc(inner_size: u64) -> BufferDescriptor<'static>
Get a buffer descriptor big enough to fit some number of Self::Inners.
Sourcefn as_binding<'a>(&'a self) -> BindingResource<'a>
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.