Skip to main content

ListMut

Trait ListMut 

Source
pub trait ListMut<T: RudaPrimitive>:
    List<T>
    + SliceMutOperator<T>
    + DerefMut<Target = [T]>
    + RudaType<ExpandType: ListMutExpand<T>> {
    // Provided methods
    fn write(&self, index: usize, value: T) { ... }
    fn __expand_write(
        scope: &mut Scope,
        this: <Self as RudaType>::ExpandType,
        index: <usize as RudaType>::ExpandType,
        value: <T as RudaType>::ExpandType,
    ) -> <() as RudaType>::ExpandType { ... }
}
Expand description

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

Provided Methods§

Source

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

Source

fn __expand_write( scope: &mut Scope, this: <Self as RudaType>::ExpandType, index: <usize as RudaType>::ExpandType, value: <T as RudaType>::ExpandType, ) -> <() as RudaType>::ExpandType

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<'a, T: RudaPrimitive, L: ListMut<T>> ListMut<T> for &'a L
where &'a L: RudaType<ExpandType = L::ExpandType> + DerefMut<Target = [T]>,

Source§

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

Source§

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

Source§

impl<'a, T: RudaPrimitive, L: ListMut<T>> ListMut<T> for &'a mut L
where &'a mut L: RudaType<ExpandType = L::ExpandType> + DerefMut<Target = [T]>,

Source§

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

Source§

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

Implementors§