pub trait BitSafe {
type Mem: BitRegister;
type Rad: Radium<Item = Self::Mem>;
fn load(&self) -> Self::Mem;
fn store(&mut self, value: Self::Mem);
}
Expand description
Restricts memory modification to only exclusive references.
The shared-mutability types do not permit locking their references to prevent writing through them when inappropriate. Implementors of this trait are able to view aliased memory and handle other references writing to it, even though they themselves may be forbidden from doing so.
Associated Types
type Mem: BitRegister
type Mem: BitRegister
The register type being guarded against shared mutation.
This is only present as an extra proof that the type graph all uses the same underlying integers.
Required methods
Reads the value out of memory only if a shared reference to the location can be produced.