ReadRegister

Trait ReadRegister 

Source
pub trait ReadRegister<R, A>
where R: ReadableRegister<Address = A>,
{ type Error; // Required method async 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

The error type returned by reading a register

Required Methods§

Source

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

Read a register

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§

Source§

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