Skip to main content

PrettyDebug

Trait PrettyDebug 

Source
pub trait PrettyDebug {
    // Required method
    fn pretty(&self) -> DebugDocBuilder;

    // Provided methods
    fn to_doc(&self) -> DebugDoc { ... }
    fn pretty_doc(
        &self,
    ) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation> { ... }
    fn pretty_builder(
        &self,
    ) -> DocBuilder<'static, BoxAllocator, ShellAnnotation> { ... }
    fn display(&self) -> String { ... }
    fn plain_string(&self, width: usize) -> String { ... }
    fn colored_string(&self, width: usize) -> String { ... }
}

Required Methods§

Provided Methods§

Source

fn to_doc(&self) -> DebugDoc

Source

fn pretty_doc( &self, ) -> Doc<'static, BoxDoc<'static, ShellAnnotation>, ShellAnnotation>

Source

fn pretty_builder(&self) -> DocBuilder<'static, BoxAllocator, ShellAnnotation>

Source

fn display(&self) -> String

A convenience method that prints out the document without colors in 70 columns. Generally, you should use plain_string or colored_string if possible, but display() can be useful for trace lines and things like that, where you don’t have control over the terminal.

Source

fn plain_string(&self, width: usize) -> String

Source

fn colored_string(&self, width: usize) -> String

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl PrettyDebug for ()

Source§

impl PrettyDebug for bool

Implementors§