pub struct ArrayViewMut<'a, T: Element, D: Dimension> { /* private fields */ }Expand description
A mutable, borrowed view into an existing array’s data.
This is a zero-copy mutable slice. The lifetime 'a ties this view
to the source array, and Rust’s borrow checker ensures exclusivity.
Implementations§
Source§impl<'a, T: Element, D: Dimension> ArrayViewMut<'a, T, D>
impl<'a, T: Element, D: Dimension> ArrayViewMut<'a, T, D>
Sourcepub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_mut_ptr(&mut self) -> *mut T
Mutable raw pointer to the first element.
Sourcepub fn as_slice_mut(&mut self) -> Option<&mut [T]>
pub fn as_slice_mut(&mut self) -> Option<&mut [T]>
Try to get a contiguous mutable slice.
Sourcepub fn layout(&self) -> MemoryLayout
pub fn layout(&self) -> MemoryLayout
Memory layout.
Sourcepub fn flags(&self) -> ArrayFlags
pub fn flags(&self) -> ArrayFlags
Array flags for this mutable view.
Source§impl<'a, T: Element, D: Dimension> ArrayViewMut<'a, T, D>
impl<'a, T: Element, D: Dimension> ArrayViewMut<'a, T, D>
Sourcepub fn slice_axis_mut(
&mut self,
axis: Axis,
spec: SliceSpec,
) -> FerrayResult<ArrayViewMut<'_, T, IxDyn>>
pub fn slice_axis_mut( &mut self, axis: Axis, spec: SliceSpec, ) -> FerrayResult<ArrayViewMut<'_, T, IxDyn>>
Slice the mutable view along a given axis.
Auto Trait Implementations§
impl<'a, T, D> Freeze for ArrayViewMut<'a, T, D>
impl<'a, T, D> RefUnwindSafe for ArrayViewMut<'a, T, D>
impl<'a, T, D> Send for ArrayViewMut<'a, T, D>
impl<'a, T, D> Sync for ArrayViewMut<'a, T, D>
impl<'a, T, D> Unpin for ArrayViewMut<'a, T, D>
impl<'a, T, D> UnsafeUnpin for ArrayViewMut<'a, T, D>
impl<'a, T, D> !UnwindSafe for ArrayViewMut<'a, T, D>
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