PrettyFormatOptions

Struct PrettyFormatOptions 

Source
pub struct PrettyFormatOptions {
Show 13 fields pub call_to_json: Option<bool>, pub escape_regex: Option<bool>, pub escape_string: Option<bool>, pub highlight: Option<bool>, pub indent: Option<usize>, pub max_depth: Option<usize>, pub max_width: Option<usize>, pub min: Option<bool>, pub print_basic_prototype: Option<bool>, pub print_function_name: Option<bool>, pub theme: Option<Theme>, pub compare_keys: Option<Rc<dyn Fn(String, String) -> usize>>, pub plugins: Option<Vec<Rc<dyn Plugin>>>,
}

Fields§

§call_to_json: Option<bool>§escape_regex: Option<bool>§escape_string: Option<bool>§highlight: Option<bool>§indent: Option<usize>§max_depth: Option<usize>§max_width: Option<usize>§min: Option<bool>§print_basic_prototype: Option<bool>§print_function_name: Option<bool>§theme: Option<Theme>§compare_keys: Option<Rc<dyn Fn(String, String) -> usize>>§plugins: Option<Vec<Rc<dyn Plugin>>>

Implementations§

Source§

impl PrettyFormatOptions

Source

pub fn call_to_json(self, value: bool) -> Self

Source

pub fn escape_regex(self, value: bool) -> Self

Source

pub fn escape_string(self, value: bool) -> Self

Source

pub fn highlight(self, value: bool) -> Self

Source

pub fn indent(self, value: usize) -> Self

Source

pub fn max_depth(self, value: usize) -> Self

Source

pub fn max_width(self, value: usize) -> Self

Source

pub fn min(self, value: bool) -> Self

Source

pub fn print_basic_prototype(self, value: bool) -> Self

Source

pub fn print_function_name(self, value: bool) -> Self

Source

pub fn theme(self, value: Theme) -> Self

Source

pub fn compare_keys(self, value: Rc<dyn Fn(String, String) -> usize>) -> Self

Source

pub fn plugins(self, value: Vec<Rc<dyn Plugin>>) -> Self

Trait Implementations§

Source§

impl Default for PrettyFormatOptions

Source§

fn default() -> PrettyFormatOptions

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.