Trait dynasmrt::Register

source ·
pub trait Register: Debug + Clone + Copy + PartialEq + Eq + Hash {
    // Required method
    fn code(&self) -> u8;
}
Expand description

A trait abstracting over architectural register families. This is usually implemented over an enum of all available registers in each family. This allows for code that is generic over register families.

Required Methods§

source

fn code(&self) -> u8

Returns the integer ID of the register. Usually equivalent to casting the enum to an u8, but allows you to be generic over the register family.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Register for RV

source§

impl Register for RX

source§

impl Register for RXSP

source§

impl Register for dynasmrt::x64::RC

source§

impl Register for Rq

source§

impl Register for dynasmrt::x64::Rx

source§

impl Register for RB

source§

impl Register for dynasmrt::x86::RC

source§

impl Register for RD

source§

impl Register for Rd

source§

impl Register for Rf

source§

impl Register for Rh

source§

impl Register for Rm

source§

impl Register for Rs

source§

impl Register for dynasmrt::x86::Rx