pub trait Register: Sized {
type Value: MmioOperand;
const OFFSET: usize;
// Required methods
fn from_raw(value: Self::Value) -> Self;
fn to_raw(&self) -> Self::Value;
}Expand description
A trait for types representing a register at a fixed offset.
Types implementing this trait are typically wrappers around fundamental types (u8, u16, u32, u64) that provide bit-level access to fields within the register.
Required Associated Constants§
Required Associated Types§
Sourcetype Value: MmioOperand
type Value: MmioOperand
The underlying integer type (e.g., u32) that holds the register bits.
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.