Trait SliceOperator

Source
pub trait SliceOperator<E: CubePrimitive>: CubeType<ExpandType: SliceOperatorExpand<E>> {
    // Provided methods
    fn slice<Start: Index, End: Index>(
        &self,
        start: Start,
        end: End,
    ) -> Slice<E, ReadOnly>  { ... }
    fn __expand_slice(
        scope: &mut Scope,
        expand: Self::ExpandType,
        start: ExpandElementTyped<u32>,
        end: ExpandElementTyped<u32>,
    ) -> SliceExpand<E, ReadOnly> { ... }
    fn slice_mut<Start: Index, End: Index>(
        &mut self,
        start: Start,
        end: End,
    ) -> Slice<E, ReadWrite>  { ... }
    fn __expand_slice_mut(
        scope: &mut Scope,
        expand: Self::ExpandType,
        start: ExpandElementTyped<u32>,
        end: ExpandElementTyped<u32>,
    ) -> SliceExpand<E, ReadWrite> { ... }
    fn to_slice(&self) -> Slice<E, ReadOnly>  { ... }
    fn __expand_to_slice(
        scope: &mut Scope,
        expand: Self::ExpandType,
    ) -> SliceExpand<E, ReadOnly> { ... }
    fn to_slice_mut(&mut self) -> Slice<E, ReadWrite>  { ... }
    fn __expand_to_slice_mut(
        scope: &mut Scope,
        expand: Self::ExpandType,
    ) -> SliceExpand<E, ReadWrite> { ... }
}

Provided Methods§

Source

fn slice<Start: Index, End: Index>( &self, start: Start, end: End, ) -> Slice<E, ReadOnly>

Return a read-only view of all elements comprise between the start and end indices. In checked mode, if the end index is out-of-bound, it is replaced by the length of self.

Source

fn __expand_slice( scope: &mut Scope, expand: Self::ExpandType, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> SliceExpand<E, ReadOnly>

Expand function of SliceOperator::slice.

Source

fn slice_mut<Start: Index, End: Index>( &mut self, start: Start, end: End, ) -> Slice<E, ReadWrite>

Return a read-write view of all elements comprise between the start and end indices. In checked mode, if the end index is out-of-bound, it is replaced by the length of self.

Source

fn __expand_slice_mut( scope: &mut Scope, expand: Self::ExpandType, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> SliceExpand<E, ReadWrite>

Expand function of SliceOperator::slice_mut.

Source

fn to_slice(&self) -> Slice<E, ReadOnly>

Reinterprete the current type as a read-only slice.

Source

fn __expand_to_slice( scope: &mut Scope, expand: Self::ExpandType, ) -> SliceExpand<E, ReadOnly>

Expand function of SliceOperator::to_slice.

Source

fn to_slice_mut(&mut self) -> Slice<E, ReadWrite>

Reinterprete the current type as a read-write slice.

Source

fn __expand_to_slice_mut( scope: &mut Scope, expand: Self::ExpandType, ) -> SliceExpand<E, ReadWrite>

Expand function of SliceOperator::to_slice_mut.

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.

Implementors§