Skip to main content

List

Trait List 

Source
pub trait List<T: RudaPrimitive>:
    SliceOperator<T>
    + Vectorized
    + Deref<Target = [T]>
    + RudaType<ExpandType: ListExpand<T>> {
    // Provided methods
    fn read(&self, index: usize) -> T { ... }
    fn read_unchecked(&self, index: usize) -> T { ... }
    fn len(&self) -> usize { ... }
    fn __expand_read(
        scope: &mut Scope,
        this: <Self as RudaType>::ExpandType,
        index: <usize as RudaType>::ExpandType,
    ) -> <T as RudaType>::ExpandType { ... }
    fn __expand_read_unchecked(
        scope: &mut Scope,
        this: <Self as RudaType>::ExpandType,
        index: <usize as RudaType>::ExpandType,
    ) -> <T as RudaType>::ExpandType { ... }
    fn __expand_len(
        scope: &mut Scope,
        this: <Self as RudaType>::ExpandType,
    ) -> <usize as RudaType>::ExpandType { ... }
}
Expand description

Type from which we can read values in ruda functions. For a mutable version, see ListMut.

Provided Methods§

Source

fn read(&self, index: usize) -> T

Source

fn read_unchecked(&self, index: usize) -> T

Source

fn len(&self) -> usize

Source

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

Source

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

Source

fn __expand_len( scope: &mut Scope, this: <Self as RudaType>::ExpandType, ) -> <usize 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: List<T>> List<T> for &'a L
where &'a L: RudaType<ExpandType = L::ExpandType> + Deref<Target = [T]>,

Source§

fn read(&self, index: usize) -> T

Source§

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

Source§

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

Source§

fn read(&self, index: usize) -> T

Source§

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

Implementors§