Trait Pretty

Source
pub trait Pretty {
    // Required method
    fn pretty_to<Writer: Write>(&self, writer: &mut Writer) -> Result<(), Error>;

    // Provided method
    fn pretty(&self) -> String { ... }
}

Required Methods§

Source

fn pretty_to<Writer: Write>(&self, writer: &mut Writer) -> Result<(), Error>

Pretty-print Self to the supplied writer.

This function must only ever write valid utf8 strings.

Provided Methods§

Source

fn pretty(&self) -> String

Pretty-print Self into a new string.

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<'a> Pretty for E0277<'a>

Source§

impl<'a> Pretty for Item<'a>