Skip to main content

PhysRegConvertible

Trait PhysRegConvertible 

Source
pub trait PhysRegConvertible: Copy + Eq {
    // Required methods
    fn into_handle(self) -> PhysRegHandle;
    fn from_handle(handle: PhysRegHandle) -> Option<Self>
       where Self: Sized;
}
Expand description

Conversion helpers that allow a concrete physical register type to be converted to/from a PhysRegHandle for dynamic dispatch.

Required Methods§

Source

fn into_handle(self) -> PhysRegHandle

Convert the register into an opaque handle.

Source

fn from_handle(handle: PhysRegHandle) -> Option<Self>
where Self: Sized,

Try to rebuild the register from an opaque handle.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl PhysRegConvertible for &'static str

Source§

impl PhysRegConvertible for u32

Implementors§