Trait dynasmrt::Register[][src]

pub trait Register: Debug + Clone + Copy + PartialEq + Eq + Hash {
    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

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.

Implementors