Skip to main content

SpmiRegister

Trait SpmiRegister 

Source
pub trait SpmiRegister<D>: SpmiRegisterDef {
    type Accessor<'a>
       where Self: 'a,
             D: 'a;

    // Required method
    fn get_accessor<'a>(spmi: &'a D) -> Self::Accessor<'a>;
}
Expand description

Trait implemented by register definitions to provide type-safe access.

D is the device type (e.g., DeviceType or custom wrapper implementing SpmiDevice).

Required Associated Types§

Source

type Accessor<'a> where Self: 'a, D: 'a

The type representing the accessor for this register.

Required Methods§

Source

fn get_accessor<'a>(spmi: &'a D) -> Self::Accessor<'a>

Constructs the accessor for this register.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§