pub struct Options<'a> { /* private fields */ }Expand description
Options represents the customizations that can be made when formatting.
Implementations§
Source§impl<'a> Options<'a>
impl<'a> Options<'a>
Sourcepub fn with_indent(self, s: &'a str) -> Self
pub fn with_indent(self, s: &'a str) -> Self
Sets the indent to the provided string. The default is two spaces.
Sourcepub fn with_line_length(self, n: usize) -> Self
pub fn with_line_length(self, n: usize) -> Self
Sets the line length that objects and arrays will wrap on. The default is 80 characters.
Sourcepub fn with_max_object_pairs_per_line(self, n: usize) -> Self
pub fn with_max_object_pairs_per_line(self, n: usize) -> Self
Sets the maximum number of object key/value pairs that can appear on the same line. The default is 1.
Sourcepub fn with_max_array_values_per_line(self, n: usize) -> Self
pub fn with_max_array_values_per_line(self, n: usize) -> Self
Sets the maximum number of array values that can appear on the same line. The default is 4.
Trait Implementations§
impl<'a> Copy for Options<'a>
Auto Trait Implementations§
impl<'a> Freeze for Options<'a>
impl<'a> RefUnwindSafe for Options<'a>
impl<'a> Send for Options<'a>
impl<'a> Sync for Options<'a>
impl<'a> Unpin for Options<'a>
impl<'a> UnwindSafe for Options<'a>
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