Skip to main content

PrettyPrint

Trait PrettyPrint 

Source
pub trait PrettyPrint<'a, T: Text<'a>> {
    // Required method
    fn pretty(&self, theme: &PrettyProvider) -> PrettyTree<'a, T>;

    // Provided methods
    fn pretty_string(&self, theme: &PrettyProvider) -> String { ... }
    fn pretty_colorful(&self, theme: &PrettyProvider) -> String { ... }
}
Expand description

Marker trait for types that can be pretty printed.

Required Methods§

Source

fn pretty(&self, theme: &PrettyProvider) -> PrettyTree<'a, T>

Build a pretty tree for this type.

Provided Methods§

Source

fn pretty_string(&self, theme: &PrettyProvider) -> String

Get a pretty string for this type.

Source

fn pretty_colorful(&self, theme: &PrettyProvider) -> String

Print a pretty string for this type.

Implementations on Foreign Types§

Source§

impl<'a, T: Text<'a>> PrettyPrint<'a, T> for &'static str

Source§

fn pretty(&self, _: &PrettyProvider) -> PrettyTree<'a, T>

Implementors§

Source§

impl<'a, T: Text<'a>> PrettyPrint<'a, T> for PrettyTree<'a, T>