Trait vmap::SpanMut

source ·
pub trait SpanMut: Span + DerefMut {
    // Required method
    fn as_mut_ptr(&mut self) -> *mut u8;

    // Provided methods
    fn write_volatile<T: Scalar>(&mut self, offset: usize, value: T) { ... }
    fn write_unaligned<T: Scalar>(&mut self, offset: usize, value: T) { ... }
}
Expand description

General trait for working with any memory-safe representation of a contiguous region of arbitrary mutable memory.

Required Methods§

source

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

Get a mutable pointer to the start of the allocated region.

Provided Methods§

source

fn write_volatile<T: Scalar>(&mut self, offset: usize, value: T)

Performs a volatile write of the value at a given offset.

Volatile operations are intended to act on I/O memory, and are guaranteed to not be elided or reordered by the compiler across other volatile operations.

source

fn write_unaligned<T: Scalar>(&mut self, offset: usize, value: T)

Performs an unaligned write of the value at a given offset.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

source§

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

Implementors§