Trait ListMut

Source
pub trait ListMut<T: CubeType>: CubeType<ExpandType: ListMutExpand<T>> + List<T> {
    // Required method
    fn __expand_write(
        scope: &mut Scope,
        this: Self::ExpandType,
        index: ExpandElementTyped<u32>,
        value: T::ExpandType,
    );

    // Provided method
    fn write(&self, index: u32, value: T) { ... }
}
Expand description

Type for which we can read and write values in cube functions. For an immutable version, see List.

Required Methods§

Source

fn __expand_write( scope: &mut Scope, this: Self::ExpandType, index: ExpandElementTyped<u32>, value: T::ExpandType, )

Provided Methods§

Source

fn write(&self, index: u32, value: T)

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<'a, T: CubeType, L: ListMut<T>> ListMut<T> for &'a L
where &'a L: CubeType<ExpandType = L::ExpandType>,

Source§

fn write(&self, index: u32, value: T)

Source§

fn __expand_write( scope: &mut Scope, this: Self::ExpandType, index: ExpandElementTyped<u32>, value: T::ExpandType, )

Source§

impl<'a, T: CubeType, L: ListMut<T>> ListMut<T> for &'a mut L
where &'a mut L: CubeType<ExpandType = L::ExpandType>,

Source§

fn write(&self, index: u32, value: T)

Source§

fn __expand_write( scope: &mut Scope, this: Self::ExpandType, index: ExpandElementTyped<u32>, value: T::ExpandType, )

Implementors§