Skip to main content

Module traits

Module traits 

Source
Expand description

Register access abstracted as traits.

Routines involving Register instances can be written generically against these traits to aid testability. See testing for utilities also implementing these traits that may be supplied instead in tests.

Traitsยง

ReadReg
A trait representing a readable register.
RwSafeReg
A trait representing a register that is both readable and safe-writable. It is automatically implemented for any type that implements both ReadReg and SafeWriteReg.
RwUnsafeReg
A trait representing a register that is both readable and unsafe-writable. It is automatically implemented for any type that implements both ReadReg and UnsafeWriteReg.
SafeWriteReg
A trait representing a safe-writable register.
UnsafeWriteReg
A trait representing an unsafe-writable register.