pub struct BusLogger<W: Write, T>(/* private fields */);Expand description
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§
Trait Implementations§
Auto Trait Implementations§
impl<W, T> Freeze for BusLogger<W, T>
impl<W, T> RefUnwindSafe for BusLogger<W, T>where
W: RefUnwindSafe,
T: RefUnwindSafe,
impl<W, T> Send for BusLogger<W, T>
impl<W, T> Sync for BusLogger<W, T>
impl<W, T> Unpin for BusLogger<W, T>
impl<W, T> UnwindSafe for BusLogger<W, T>where
W: UnwindSafe,
T: UnwindSafe,
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