pub trait MemoryRead {
// Required methods
fn read_raw(&self, range: Range<usize>) -> MemoryResult<&[u8]>;
fn access_right<T: Register>(&self) -> AccessRight;
fn read<T: Register>(&self) -> MemoryResult<T::Ty>;
}
Required Methods§
fn read_raw(&self, range: Range<usize>) -> MemoryResult<&[u8]>
fn access_right<T: Register>(&self) -> AccessRight
Sourcefn read<T: Register>(&self) -> MemoryResult<T::Ty>
fn read<T: Register>(&self) -> MemoryResult<T::Ty>
Read data from the register.
Since the host side know nothing about Register
, this method can be called only from the machine side so access rights are temporarily set to RW
.
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.