Skip to main content

PrettyHex

Trait PrettyHex 

Source
pub trait PrettyHex {
    // Required methods
    fn hex_dump(&self) -> Hex<'_, Self>;
    fn hex_conf(&self, cfg: HexConfig) -> Hex<'_, Self>;
}
Expand description

Allows generates hex dumps to a formatter.

Required Methods§

Source

fn hex_dump(&self) -> Hex<'_, Self>

Wrap self reference for use in std::fmt::Display and std::fmt::Debug formatting as hex dumps.

Source

fn hex_conf(&self, cfg: HexConfig) -> Hex<'_, Self>

Wrap self reference for use in std::fmt::Display and std::fmt::Debug formatting as hex dumps in specified format.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> PrettyHex for T
where T: AsRef<[u8]> + ?Sized,