pub trait Register: Copy {
type Regwidth: RegInt + AsPrimitive<Self::Accesswidth>;
type Accesswidth: RegInt + AsPrimitive<Self::Regwidth>;
type Access: Access;
type ByteEndian: Endian;
type WordEndian: Endian;
// Required methods
unsafe fn from_raw(val: Self::Regwidth) -> Self;
fn to_raw(self) -> Self::Regwidth;
}Expand description
Trait implemented by all register types.
Required Associated Types§
Sourcetype Regwidth: RegInt + AsPrimitive<Self::Accesswidth>
type Regwidth: RegInt + AsPrimitive<Self::Accesswidth>
Primitive integer type representing the size of the full register value.
Sourcetype Accesswidth: RegInt + AsPrimitive<Self::Regwidth>
type Accesswidth: RegInt + AsPrimitive<Self::Regwidth>
Primitive integer type representing the size of memory accesses used when reading/writing this register.
Sourcetype ByteEndian: Endian
type ByteEndian: Endian
Ordering of bytes within each accesswidth subword.
Sourcetype WordEndian: Endian
type WordEndian: Endian
Ordering of accesswidth subwords within the register.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.