pub unsafe trait SplittableViewImplMut: SplittableViewImpl {
// Required method
unsafe fn view_mut(&self, index: u64, len: usize) -> &mut [Self::Item];
}Expand description
The implementation behind SplittableViewMut.
Unless you are manually implementing a view, you should use SplittableViewMut directly.
§Safety
The implementation must satisfy the various interior mutability conditions specified in each method.
Required Methods§
Sourceunsafe fn view_mut(&self, index: u64, len: usize) -> &mut [Self::Item]
unsafe fn view_mut(&self, index: u64, len: usize) -> &mut [Self::Item]
Obtain a mutable view into the stream.
§Safety
- The parameters must be within an available window as returned by
poll_available. - The view must not overlap with any other view of this stream.
Note that this function produces a mutable reference from a regular reference.
Implementations of this function must take care to correctly implement interior
mutability (such as using UnsafeCell).
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.
Implementors§
impl<'a, T> SplittableViewImplMut for SliceMut<'a, T>
impl<T> SplittableViewImplMut for Source<T>
Available on crate features
std only.