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

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.

The accessor type being prevented from mutating while shared.

This is exposed as an associated type so that BitStore can name it without having to re-select it based on crate configuration.

Required methods

Reads the value out of memory only if a shared reference to the location can be produced.

Writes a value into memory only if an exclusive reference to the location can be produced.

Implementors