pub struct SliceMut<'a, E> { /* private fields */ }
Expand description
A read-write contiguous list of elements.
Implementations§
Source§impl<'a, E> SliceMut<'a, E>
impl<'a, E> SliceMut<'a, E>
Sourcepub fn as_aligned(&self) -> SliceMut<'a, Line<E>>where
E: CubePrimitive,
pub fn as_aligned(&self) -> SliceMut<'a, Line<E>>where
E: CubePrimitive,
Returns the same slice, but with lines of length 1.
Source§impl<'a, E: CubePrimitive> SliceMut<'a, E>
impl<'a, E: CubePrimitive> SliceMut<'a, E>
Sourcepub unsafe fn index_unchecked<I: Index>(&self, _i: I) -> &Ewhere
Self: CubeIndex<I>,
pub unsafe fn index_unchecked<I: Index>(&self, _i: I) -> &Ewhere
Self: CubeIndex<I>,
Perform an unchecked index into the array
§Safety
Out of bounds indexing causes undefined behaviour and may segfault. Ensure index is always in bounds
Sourcepub unsafe fn index_assign_unchecked<I: Index>(&mut self, _i: I, _value: E)where
Self: CubeIndexMut<I>,
pub unsafe fn index_assign_unchecked<I: Index>(&mut self, _i: I, _value: E)where
Self: CubeIndexMut<I>,
Perform an unchecked index assignment into the array
§Safety
Out of bounds indexing causes undefined behaviour and may segfault. Ensure index is always in bounds
Trait Implementations§
Source§impl<'a, E: CubeType, I: Index> CubeIndexMut<I> for SliceMut<'a, E>
impl<'a, E: CubeType, I: Index> CubeIndexMut<I> for SliceMut<'a, E>
fn cube_idx_mut(&mut self, _i: T) -> &mut Self::Output
Source§impl<'a, E: CubeType> CubeType for SliceMut<'a, E>
impl<'a, E: CubeType> CubeType for SliceMut<'a, E>
type ExpandType = ExpandElementTyped<SliceMut<'static, E>>
Source§fn init(context: &mut CubeContext, expand: Self::ExpandType) -> Self::ExpandType
fn init(context: &mut CubeContext, expand: Self::ExpandType) -> Self::ExpandType
Wrapper around the init method, necessary to type inference.
Source§impl<'a, E: CubePrimitive> SliceOperator<E> for SliceMut<'a, E>
impl<'a, E: CubePrimitive> SliceOperator<E> for SliceMut<'a, E>
type Expand = ExpandElementTyped<SliceMut<'static, E>>
Source§fn 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.
Source§fn __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.
Source§fn 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.
Source§fn __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.
Source§fn 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. Read more
Source§fn __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.
Source§fn __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.
Source§fn 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.
Source§fn __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.
Source§fn as_slice_mut_unsafe(&self) -> &mut SliceMut<'_, E>
fn as_slice_mut_unsafe(&self) -> &mut SliceMut<'_, E>
Reinterprete the current type as a read-write slice. Read more
Source§fn __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.
Auto Trait Implementations§
impl<'a, E> Freeze for SliceMut<'a, E>
impl<'a, E> RefUnwindSafe for SliceMut<'a, E>where
E: RefUnwindSafe,
impl<'a, E> Send for SliceMut<'a, E>where
E: Send,
impl<'a, E> Sync for SliceMut<'a, E>where
E: Sync,
impl<'a, E> Unpin for SliceMut<'a, E>where
E: Unpin,
impl<'a, E> !UnwindSafe for SliceMut<'a, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more