[−][src]Struct buslogger::BusLogger
A wrapper around an embedded_hal bus peripheral that traces each read and write call and prints the raw bytes that were sent or received. It will also pretty-print the error result if the underlying request failed.
Currently, this requires that the error type of the underlying peripheral implements std::fmt::Debug, which most of them seem to do.
Implementations
impl<W: Write, T> BusLogger<W, T>
[src]
Trait Implementations
impl<W: Write, T: Read> Read for BusLogger<W, T> where
<T as Read>::Error: Debug,
[src]
<T as Read>::Error: Debug,
type Error = T::Error
Error type
fn read(&mut self, address: u8, buffer: &mut [u8]) -> Result<(), Self::Error>
[src]
impl<W: Write, T: Write> Write for BusLogger<W, T> where
<T as Write>::Error: Debug,
[src]
<T as Write>::Error: Debug,
type Error = T::Error
Error type
fn write(&mut self, addr: u8, bytes: &[u8]) -> Result<(), Self::Error>
[src]
impl<W: Write, T: WriteRead> WriteRead for BusLogger<W, T> where
<T as WriteRead>::Error: Debug,
[src]
<T as WriteRead>::Error: Debug,
Auto Trait Implementations
impl<W, T> Send for BusLogger<W, T> where
T: Send,
W: Send,
T: Send,
W: Send,
impl<W, T> Sync for BusLogger<W, T> where
T: Sync,
W: Sync,
T: Sync,
W: Sync,
impl<W, T> Unpin for BusLogger<W, T> where
T: Unpin,
W: Unpin,
T: Unpin,
W: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,