Skip to main content

RegisterRead

Trait RegisterRead 

Source
pub trait RegisterRead {
    // Required methods
    fn get(&self, addr: u16) -> u16;
    fn is_valid(&self, addr: u16) -> bool;
}
Expand description

RegisterRead:支持 is_valid(addr) 用于越界检查 支持03/04寄存器的读取(Hreg/Ireg)

Required Methods§

Source

fn get(&self, addr: u16) -> u16

Source

fn is_valid(&self, addr: u16) -> bool

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<const N: usize> RegisterRead for Hreg<N>

Source§

impl<const N: usize> RegisterRead for Ireg<N>