zerocopy

Trait ByteSliceMut

Source
pub unsafe trait ByteSliceMut: ByteSlice + DerefMut {
    // Provided method
    fn as_mut_ptr(&mut self) -> *mut u8 { ... }
}
Expand description

A mutable reference to a byte slice.

ByteSliceMut abstracts over various ways of storing a mutable reference to a byte slice, and is implemented for various special reference types such as RefMut<[u8]>.

Provided Methods§

Source

fn as_mut_ptr(&mut self) -> *mut u8

Gets a mutable raw pointer to the first byte in the slice.

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.

Implementations on Foreign Types§

Source§

impl<'a> ByteSliceMut for &'a mut [u8]

Source§

impl<'a> ByteSliceMut for RefMut<'a, [u8]>

Implementors§