Trait rstubs::arch::io::VolatileUpdate
source · pub trait VolatileUpdate<T> {
// Required method
unsafe fn update_volatile(&self, f: impl FnOnce(T) -> T);
}
Expand description
Extension for pointers, that provides a volatile update function (read->modify->write)
Required Methods§
sourceunsafe fn update_volatile(&self, f: impl FnOnce(T) -> T)
unsafe fn update_volatile(&self, f: impl FnOnce(T) -> T)
Reads from the memory address, passes the value to f
, and writes the value it returns back to memory.
Object Safety§
This trait is not object safe.