Skip to main content

BufferTag

Trait BufferTag 

Source
pub trait BufferTag {
    type T;

    // Required method
    fn usage() -> u32;
}
Expand description

Tag associated with a particular GenericFlexBuffer

The tag type serves two purposes:

  • It declares the storage type and usage bits for the buffer
  • It makes buffers strongly typed, so that two buffers with equivalent storage and usage bits can be distinct types.

Required Associated Types§

Source

type T

Data type stored in the buffer

Required Methods§

Source

fn usage() -> u32

Usage bits for the buffer

This must be a union of wgpu::BufferUsages values

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§