Skip to main content

ReadRegister

Trait ReadRegister 

Source
pub trait ReadRegister<R, A>
where R: ReadableRegister<Address = A>,
{ type Error; // Required method fn read(&mut self) -> Result<R, Self::Error>; }
Expand description

Trait to safely read a register. Only a readable register can be read.

Required Associated Types§

Source

type Error

Error type returned by reading the register

Required Methods§

Source

fn read(&mut self) -> Result<R, Self::Error>

Read a register

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<I, R, A> ReadRegister<R, A> for I
where R: ReadableRegister<Address = A>, I: RegisterInterface<R, A>,