Skip to main content

BufferTag

Trait BufferTag 

Source
pub trait BufferTag {
    type T;
    type S: BufferItemCount + Copy;

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

Tag associated with a particular FlexBuffer

The tag type serves two purposes:

  • It declares the storage type, usage bits, and size type 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

Source

type S: BufferItemCount + Copy

Size type

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§