[][src]Struct buslogger::BusLogger

pub struct BusLogger<W: Write, T>(_, _);

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]

pub fn new(w: W, t: T) -> BusLogger<W, T>[src]

Trait Implementations

impl<W: Write, T: Read> Read for BusLogger<W, T> where
    <T as Read>::Error: Debug
[src]

type Error = T::Error

Error type

impl<W: Write, T: Write> Write for BusLogger<W, T> where
    <T as Write>::Error: Debug
[src]

type Error = T::Error

Error type

impl<W: Write, T: WriteRead> WriteRead for BusLogger<W, T> where
    <T as WriteRead>::Error: Debug
[src]

type Error = T::Error

Error type

Auto Trait Implementations

impl<W, T> Send for BusLogger<W, T> where
    T: Send,
    W: Send

impl<W, T> Sync for BusLogger<W, T> where
    T: Sync,
    W: Sync

impl<W, T> Unpin for BusLogger<W, T> where
    T: Unpin,
    W: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.