[−][src]Struct smoltcp::phy::Tracer
A tracer device.
A tracer is a device that pretty prints all packets traversing it using the provided writer function, and then passes them to another device.
Implementations
impl<D: for<'a> Device<'a>, P: PrettyPrint> Tracer<D, P>
[src]
pub fn new(
inner: D,
writer: fn(timestamp: Instant, printer: PrettyPrinter<'_, P>)
) -> Tracer<D, P>
[src]
inner: D,
writer: fn(timestamp: Instant, printer: PrettyPrinter<'_, P>)
) -> Tracer<D, P>
Create a tracer device.
pub fn get_ref(&self) -> &D
[src]
Get a reference to the underlying device.
Even if the device offers reading through a standard reference, it is inadvisable to directly read from the device as doing so will circumvent the tracing.
pub fn get_mut(&mut self) -> &mut D
[src]
Get a mutable reference to the underlying device.
It is inadvisable to directly read from the device as doing so will circumvent the tracing.
pub fn into_inner(self) -> D
[src]
Return the underlying device, consuming the tracer.
Trait Implementations
impl<'a, D, P> Device<'a> for Tracer<D, P> where
D: for<'b> Device<'b>,
P: PrettyPrint + 'a,
[src]
D: for<'b> Device<'b>,
P: PrettyPrint + 'a,
Auto Trait Implementations
impl<D, P> RefUnwindSafe for Tracer<D, P> where
D: RefUnwindSafe,
[src]
D: RefUnwindSafe,
impl<D, P> Send for Tracer<D, P> where
D: Send,
[src]
D: Send,
impl<D, P> Sync for Tracer<D, P> where
D: Sync,
[src]
D: Sync,
impl<D, P> Unpin for Tracer<D, P> where
D: Unpin,
[src]
D: Unpin,
impl<D, P> UnwindSafe for Tracer<D, P> where
D: UnwindSafe,
[src]
D: UnwindSafe,
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,
pub 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.
pub 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>,