pub struct PrettyPrinter { /* private fields */ }Expand description
A formatter for pretty-printing Facet types
Implementations§
Source§impl PrettyPrinter
impl PrettyPrinter
Sourcepub fn with_indent_size(self, size: usize) -> Self
pub fn with_indent_size(self, size: usize) -> Self
Set the indentation size
Sourcepub fn with_max_depth(self, depth: usize) -> Self
pub fn with_max_depth(self, depth: usize) -> Self
Set the maximum depth for recursive printing
Sourcepub fn with_color_generator(self, generator: ColorGenerator) -> Self
pub fn with_color_generator(self, generator: ColorGenerator) -> Self
Set the color generator
Sourcepub fn with_colors(self, use_colors: bool) -> Self
pub fn with_colors(self, use_colors: bool) -> Self
Enable or disable colors
Sourcepub fn format_to<T: Facet>(&self, value: &T, f: &mut Formatter<'_>) -> Result
pub fn format_to<T: Facet>(&self, value: &T, f: &mut Formatter<'_>) -> Result
Format a value to a formatter
Sourcepub fn format_peek(&self, value: Peek<'_>) -> String
pub fn format_peek(&self, value: Peek<'_>) -> String
Format a value to a string
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrettyPrinter
impl RefUnwindSafe for PrettyPrinter
impl Send for PrettyPrinter
impl Sync for PrettyPrinter
impl Unpin for PrettyPrinter
impl UnwindSafe for PrettyPrinter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Stylize for T
impl<T> Stylize for T
Source§fn bright_red(self) -> Styled<T>
fn bright_red(self) -> Styled<T>
Apply bright red color style to a value.
Source§fn bright_green(self) -> Styled<T>
fn bright_green(self) -> Styled<T>
Apply bright green color style to a value.
Source§fn bright_blue(self) -> Styled<T>
fn bright_blue(self) -> Styled<T>
Apply bright blue color style to a value.
Source§fn bright_yellow(self) -> Styled<T>
fn bright_yellow(self) -> Styled<T>
Apply bright yellow color style to a value.
Source§fn bright_magenta(self) -> Styled<T>
fn bright_magenta(self) -> Styled<T>
Apply bright magenta color style to a value.
Source§fn bright_cyan(self) -> Styled<T>
fn bright_cyan(self) -> Styled<T>
Apply bright cyan color style to a value.
Source§fn bright_white(self) -> Styled<T>
fn bright_white(self) -> Styled<T>
Apply bright white color style to a value.