pub trait SliceOperator<E: CubeType>: CubeType<ExpandType = Self::Expand> {
type Expand: SliceOperatorExpand<E>;
// Provided methods
fn slice<Start: Index, End: Index>(
&self,
start: Start,
end: End,
) -> &Slice<'_, E> ⓘ { ... }
fn __expand_slice(
context: &mut CubeContext,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<Slice<'static, E>> { ... }
fn slice_mut<Start: Index, End: Index>(
&mut self,
start: Start,
end: End,
) -> &mut SliceMut<'_, E> { ... }
fn __expand_slice_mut(
context: &mut CubeContext,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<SliceMut<'static, E>> { ... }
fn slice_mut_unsafe<Start: Index, End: Index>(
&self,
start: Start,
end: End,
) -> &mut SliceMut<'_, E> { ... }
fn __expand_slice_mut_unsafe(
context: &mut CubeContext,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<SliceMut<'static, E>> { ... }
fn as_slice(&self) -> &Slice<'_, E> ⓘ { ... }
fn __expand_as_slice(
context: &mut CubeContext,
expand: Self::Expand,
) -> ExpandElementTyped<Slice<'static, E>> { ... }
fn as_slice_mut(&mut self) -> &mut SliceMut<'_, E> { ... }
fn __expand_as_slice_mut(
context: &mut CubeContext,
expand: Self::Expand,
) -> ExpandElementTyped<SliceMut<'static, E>> { ... }
fn as_slice_mut_unsafe(&self) -> &mut SliceMut<'_, E> { ... }
fn __expand_as_slice_mut_unsafe(
context: &mut CubeContext,
expand: Self::Expand,
) -> ExpandElementTyped<SliceMut<'static, E>> { ... }
}
Required Associated Types§
type Expand: SliceOperatorExpand<E>
Provided Methods§
Sourcefn slice<Start: Index, End: Index>(
&self,
start: Start,
end: End,
) -> &Slice<'_, E> ⓘ
fn slice<Start: Index, End: Index>( &self, start: Start, end: End, ) -> &Slice<'_, E> ⓘ
Return a read-only view of all elements comprise between the start and end index.
Sourcefn __expand_slice(
context: &mut CubeContext,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_slice( context: &mut CubeContext, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<Slice<'static, E>>
Expand function of SliceOperator::slice.
Sourcefn slice_mut<Start: Index, End: Index>(
&mut self,
start: Start,
end: End,
) -> &mut SliceMut<'_, E>
fn slice_mut<Start: Index, End: Index>( &mut self, start: Start, end: End, ) -> &mut SliceMut<'_, E>
Return a read-write view of all elements comprise between the start and end index.
Sourcefn __expand_slice_mut(
context: &mut CubeContext,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_slice_mut( context: &mut CubeContext, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<SliceMut<'static, E>>
Expand function of SliceOperator::slice_mut.
Sourcefn slice_mut_unsafe<Start: Index, End: Index>(
&self,
start: Start,
end: End,
) -> &mut SliceMut<'_, E>
fn slice_mut_unsafe<Start: Index, End: Index>( &self, start: Start, end: End, ) -> &mut SliceMut<'_, E>
Return a read-write view of all elements comprise between the start and end index.
§Warning
Ignore the multiple borrow rule.
Sourcefn __expand_slice_mut_unsafe(
context: &mut CubeContext,
expand: Self::Expand,
start: ExpandElementTyped<u32>,
end: ExpandElementTyped<u32>,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_slice_mut_unsafe( context: &mut CubeContext, expand: Self::Expand, start: ExpandElementTyped<u32>, end: ExpandElementTyped<u32>, ) -> ExpandElementTyped<SliceMut<'static, E>>
Expand function of SliceOperator::slice_mut_unsafe.
Sourcefn __expand_as_slice(
context: &mut CubeContext,
expand: Self::Expand,
) -> ExpandElementTyped<Slice<'static, E>>
fn __expand_as_slice( context: &mut CubeContext, expand: Self::Expand, ) -> ExpandElementTyped<Slice<'static, E>>
Expand function of SliceOperator::as_slice.
Sourcefn as_slice_mut(&mut self) -> &mut SliceMut<'_, E>
fn as_slice_mut(&mut self) -> &mut SliceMut<'_, E>
Reinterprete the current type as a read-write slice.
Sourcefn __expand_as_slice_mut(
context: &mut CubeContext,
expand: Self::Expand,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_as_slice_mut( context: &mut CubeContext, expand: Self::Expand, ) -> ExpandElementTyped<SliceMut<'static, E>>
Expand function of SliceOperator::as_slice_mut.
Sourcefn as_slice_mut_unsafe(&self) -> &mut SliceMut<'_, E>
fn as_slice_mut_unsafe(&self) -> &mut SliceMut<'_, E>
Sourcefn __expand_as_slice_mut_unsafe(
context: &mut CubeContext,
expand: Self::Expand,
) -> ExpandElementTyped<SliceMut<'static, E>>
fn __expand_as_slice_mut_unsafe( context: &mut CubeContext, expand: Self::Expand, ) -> ExpandElementTyped<SliceMut<'static, E>>
Expand function of SliceOperator::as_slice_mut_unsafe.
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.