AutomatedBufferSet

Trait AutomatedBufferSet 

Source
pub trait AutomatedBufferSet<'buf> {
    type Key: Hash + Eq + Clone;
    type Value;

    // Required methods
    fn get(self) -> Self::Value;
    fn value_to_key(value: &Self::Value) -> Self::Key;
}
Expand description

Values that can be used with BindGroupCache.

Implemented for &AutomatedBuffer and 1, 2, 3, and 4-tuples thereof.

Required Associated Types§

Source

type Key: Hash + Eq + Clone

Key type corresponding to this buffer type.

BufferCache1, BufferCache2, BufferCache3, and BufferCache4 are aliases for this value for the corresponding value, 2, 3, and 4-tuple.

Source

type Value

Underlying buffer type.

Required Methods§

Source

fn get(self) -> Self::Value

Get the buffer values

Source

fn value_to_key(value: &Self::Value) -> Self::Key

Translate a value into a key

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.

Implementations on Foreign Types§

Source§

impl<'buf> AutomatedBufferSet<'buf> for (&'buf AutomatedBuffer, &'buf AutomatedBuffer)

Source§

type Key = (usize, usize)

Source§

type Value = (Arc<IdBuffer>, Arc<IdBuffer>)

Source§

fn get(self) -> Self::Value

Source§

fn value_to_key(value: &Self::Value) -> Self::Key

Source§

impl<'buf> AutomatedBufferSet<'buf> for (&'buf AutomatedBuffer, &'buf AutomatedBuffer, &'buf AutomatedBuffer)

Source§

type Key = (usize, usize, usize)

Source§

type Value = (Arc<IdBuffer>, Arc<IdBuffer>, Arc<IdBuffer>)

Source§

fn get(self) -> Self::Value

Source§

fn value_to_key(value: &Self::Value) -> Self::Key

Source§

impl<'buf> AutomatedBufferSet<'buf> for (&'buf AutomatedBuffer, &'buf AutomatedBuffer, &'buf AutomatedBuffer, &'buf AutomatedBuffer)

Source§

type Key = (usize, usize, usize, usize)

Source§

type Value = (Arc<IdBuffer>, Arc<IdBuffer>, Arc<IdBuffer>, Arc<IdBuffer>)

Source§

fn get(self) -> Self::Value

Source§

fn value_to_key(value: &Self::Value) -> Self::Key

Source§

impl<'buf> AutomatedBufferSet<'buf> for (&'buf AutomatedBuffer,)

Source§

type Key = usize

Source§

type Value = Arc<IdBuffer>

Source§

fn get(self) -> Self::Value

Source§

fn value_to_key(value: &Self::Value) -> Self::Key

Implementors§