pub struct Pp<S = String> {
pub indent: Option<S>,
pub sort_keys: bool,
pub styles: Styles<S>,
pub sep_space: bool,
}Expand description
Pretty printer.
Fields§
§indent: Option<S>indent by repeating given string n times
sort_keys: boolsort objects by keys
styles: Styles<S>styles for different types of values
sep_space: boolput a space after ‘:’
This is necessary for YAML, which interprets {1:2} as {“1:2”: null}, whereas it interprets {1: 2} as {1: 2}.
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Pp<S>where
S: Freeze,
impl<S> RefUnwindSafe for Pp<S>where
S: RefUnwindSafe,
impl<S> Send for Pp<S>where
S: Send,
impl<S> Sync for Pp<S>where
S: Sync,
impl<S> Unpin for Pp<S>where
S: Unpin,
impl<S> UnsafeUnpin for Pp<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Pp<S>where
S: UnwindSafe,
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