pub unsafe trait MutDenseData: DenseData {
// Required method
fn as_mut_slice(&mut self) -> &mut [Self::Elem];
}Expand description
A mutable companion to DenseData.
This trait allows mutable methods on view types to be selectively enabled when data underlying the type is mutable.
§Safety
This trait is unsafe because it requires as_slice to be idempotent (and unsafe code
relies on this).
In other words: as_slice must always return the same slice with the same length.
Additionally, the returned slice must span the exact same memory as as_slice.