Skip to main content

AsMutSlice

Trait AsMutSlice 

Source
pub trait AsMutSlice: AsSlice {
    // Required method
    fn as_mut_slice(&mut self) -> &mut [Self::Element];
}
Expand description

Something that can be seen as an mutable slice

Required Methods§

Source

fn as_mut_slice(&mut self) -> &mut [Self::Element]

Returns the mutable slice view of Self

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, S> AsMutSlice for &'a mut S
where S: ?Sized + AsMutSlice,

Source§

fn as_mut_slice(&mut self) -> &mut [S::Element]

Source§

impl<T> AsMutSlice for [T]

Source§

fn as_mut_slice(&mut self) -> &mut [T]

Source§

impl<T, const N: usize> AsMutSlice for [T; N]

Source§

fn as_mut_slice(&mut self) -> &mut [T]

Implementors§