pub struct MockIO<const N: usize>(/* private fields */);Expand description
Mocked RegisterIO implementation.
Implemented as an array of N bytes, register writes and reads simply write to/from the internal array.
Implementations§
Trait Implementations§
Source§impl<const N: usize> RawRegisterIO for MockIO<N>
impl<const N: usize> RawRegisterIO for MockIO<N>
Source§type Error = Infallible
type Error = Infallible
The error type this register transport returns. For infallible transports
(e.g., direct volatile pointer accesses), this should be
core::convert::Infallible
so that the Reg type can provide an infallible API in addition
to the try_* API.Auto Trait Implementations§
impl<const N: usize> !Freeze for MockIO<N>
impl<const N: usize> !RefUnwindSafe for MockIO<N>
impl<const N: usize> Send for MockIO<N>
impl<const N: usize> !Sync for MockIO<N>
impl<const N: usize> Unpin for MockIO<N>
impl<const N: usize> UnsafeUnpin for MockIO<N>
impl<const N: usize> UnwindSafe for MockIO<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> RegisterIO for Twhere
T: RawRegisterIO,
impl<T> RegisterIO for Twhere
T: RawRegisterIO,
type Error = <T as RawRegisterIO>::Error
Source§unsafe fn try_read_register<R>(
&self,
ptr: *const <R as Register>::Regwidth,
) -> Result<R, <T as RegisterIO>::Error>
unsafe fn try_read_register<R>( &self, ptr: *const <R as Register>::Regwidth, ) -> Result<R, <T as RegisterIO>::Error>
Read a register value Read more