pub trait SwappableVectorViewMut<T: ?Sized>: VectorViewMut<T> {
// Required method
fn swap(&mut self, i: usize, j: usize);
}
Expand description
A trait for VectorViewMut
s that support swapping of two elements.
Since VectorViewMut
is not necessarily able to return two mutable
references to different entries, supporting swapping is indeed a stronger
property than just being a VectorViewMut
.
Required Methods§
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.