smoltcp::wire::pretty_print

Trait PrettyPrint

Source
pub trait PrettyPrint {
    // Required method
    fn pretty_print(
        buffer: &dyn AsRef<[u8]>,
        fmt: &mut Formatter<'_>,
        indent: &mut PrettyIndent,
    ) -> Result;
}
Expand description

Interface for printing listings.

Required Methods§

Source

fn pretty_print( buffer: &dyn AsRef<[u8]>, fmt: &mut Formatter<'_>, indent: &mut PrettyIndent, ) -> Result

Write a concise, formatted representation of a packet contained in the provided buffer, and any nested packets it may contain.

pretty_print accepts a buffer and not a packet wrapper because the packet might be truncated, and so it might not be possible to create the packet wrapper.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: AsRef<[u8]>> PrettyPrint for smoltcp::wire::ArpPacket<T>

Source§

impl<T: AsRef<[u8]>> PrettyPrint for Frame<T>

Source§

impl<T: AsRef<[u8]>> PrettyPrint for smoltcp::wire::Icmpv4Packet<T>

Source§

impl<T: AsRef<[u8]>> PrettyPrint for smoltcp::wire::Ipv4Packet<T>

Source§

impl<T: AsRef<[u8]>> PrettyPrint for smoltcp::wire::Ipv6Packet<T>

Source§

impl<T: AsRef<[u8]>> PrettyPrint for NdiscOption<T>

Source§

impl<T: AsRef<[u8]>> PrettyPrint for smoltcp::wire::TcpPacket<T>

Source§

impl<T: AsRef<[u8]>> PrettyPrint for smoltcp::wire::UdpPacket<T>