pub trait Reg:
Sized
+ Copy
+ Eq
+ Ord
+ Hash
+ Into<AnyReg>
+ Debug
+ Display {
const RANGE: Range<u8>;
// Required methods
unsafe fn new_unchecked(index: u8) -> Self;
fn to_u8(self) -> u8;
// Provided methods
fn new(index: u8) -> Option<Self> { ... }
fn index(self) -> usize { ... }
}
Expand description
Trait for common register operations.
Required Associated Constants§
Required Methods§
Sourceunsafe fn new_unchecked(index: u8) -> Self
unsafe fn new_unchecked(index: u8) -> Self
Convert a register index to a register, without bounds checking.
Provided 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.