Trait volatile_mem::VolatileWriteSlice [−][src]
Data which is, or can be treated as, a writable slice of volatile elements.
The data to be written is of type [U]
.
This trait has a blanket implementation for all types which meet the criteria.
Provided methods
fn fill_volatile(&mut self, val: U)
[src]
Performs a volatile write of each element of the slice with the given
value without reading the old data from self
.
Safety
Just like in C, whether an operation is volatile has no bearing whatsoever on questions involving concurrent access from multiple threads. Volatile accesses behave exactly like non-atomic accesses in that regard. In particular, a race between a write operation any other operation (reading or writing) to the same location is undefined behavior.
fn write_slice_volatile(&mut self, src: &[U])
[src]
Performs a volatile write of each element of self
, copying the data
from src
, without reading the old data from self
.
The length of src
must be the same as self
.
Panics
This function will panic if the two slices have different lengths.
Safety
Just like in C, whether an operation is volatile has no bearing whatsoever on questions involving concurrent access from multiple threads. Volatile accesses behave exactly like non-atomic accesses in that regard. In particular, a race between a write operation any other operation (reading or writing) to the same location is undefined behavior.
Implementors
impl<S, T, U> VolatileWriteSlice<T, U> for S where
S: AsMut<[T]>,
T: VolatileWrite<U>,
U: Copy,
[src]
S: AsMut<[T]>,
T: VolatileWrite<U>,
U: Copy,