pub trait CubeIndex: CubeType<ExpandType: CubeIndexExpand<Idx = <Self::Idx as CubeType>::ExpandType, Output = <Self::Output as CubeType>::ExpandType>> {
    type Output: CubeType;
    type Idx: CubeType;
    // Provided methods
    fn cube_idx(&self, _i: Self::Idx) -> &Self::Output { ... }
    fn expand_index(
        scope: &mut Scope,
        array: Self::ExpandType,
        index: <Self::Idx as CubeType>::ExpandType,
    ) -> <Self::Output as CubeType>::ExpandType { ... }
    fn expand_index_unchecked(
        scope: &mut Scope,
        array: Self::ExpandType,
        index: <Self::Idx as CubeType>::ExpandType,
    ) -> <Self::Output as CubeType>::ExpandType { ... }
}Expand description
Fake indexation so we can rewrite indexes into scalars as calls to this fake function in the non-expanded function
Required Associated Types§
Provided Methods§
fn cube_idx(&self, _i: Self::Idx) -> &Self::Output
fn expand_index( scope: &mut Scope, array: Self::ExpandType, index: <Self::Idx as CubeType>::ExpandType, ) -> <Self::Output as CubeType>::ExpandType
fn expand_index_unchecked( scope: &mut Scope, array: Self::ExpandType, index: <Self::Idx as CubeType>::ExpandType, ) -> <Self::Output as CubeType>::ExpandType
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.