#[non_exhaustive]pub enum JsonLayout {
Compact,
Pretty,
PrettyOnTerminal,
}Available on crate feature
view only.Expand description
How JSON output is broken into lines. No layout adds ANSI.
The layout changes only whitespace, so every layout parses to the same value.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Compact
The whole document on one line.
Pretty
One value per line, indented by two spaces.
PrettyOnTerminal
Self::Pretty when stdout is a terminal, and Self::Compact
otherwise.
Trait Implementations§
Source§impl Clone for JsonLayout
impl Clone for JsonLayout
impl Copy for JsonLayout
Source§impl Debug for JsonLayout
impl Debug for JsonLayout
Source§impl Default for JsonLayout
impl Default for JsonLayout
impl Eq for JsonLayout
Source§impl PartialEq for JsonLayout
impl PartialEq for JsonLayout
impl StructuralPartialEq for JsonLayout
Auto Trait Implementations§
impl Forget for JsonLayout
impl Freeze for JsonLayout
impl Move for JsonLayout
impl RefUnwindSafe for JsonLayout
impl Send for JsonLayout
impl Sync for JsonLayout
impl Unpin for JsonLayout
impl UnsafeUnpin for JsonLayout
impl UnwindSafe for JsonLayout
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