Skip to main content

ReadableIndexedRegister

Trait ReadableIndexedRegister 

Source
pub trait ReadableIndexedRegister: IndexedRegister {
    // Provided method
    fn read_index<M: Mmio + ?Sized>(mmio: &M, index: usize) -> Self { ... }
}
Expand description

A trait for indexed registers that can be read.

Provided Methods§

Source

fn read_index<M: Mmio + ?Sized>(mmio: &M, index: usize) -> Self

Loads the register value at index from the MMIO region.

The offset is calculated as BASE_OFFSET + (index * STRIDE).

§Panics

This method will panic if index is greater than or equal to COUNT.

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.

Implementors§