Struct jomini::json::JsonOptions
source · pub struct JsonOptions { /* private fields */ }
Expand description
Customizes the JSON output
Implementations§
source§impl JsonOptions
impl JsonOptions
sourcepub fn with_prettyprint(self, pretty: bool) -> JsonOptions
pub fn with_prettyprint(self, pretty: bool) -> JsonOptions
Sets if the JSON should be pretty printed or minified
sourcepub fn with_duplicate_keys(
self,
duplicate_keys: DuplicateKeyMode,
) -> JsonOptions
pub fn with_duplicate_keys( self, duplicate_keys: DuplicateKeyMode, ) -> JsonOptions
Sets how duplicate keys are formatted
sourcepub fn with_type_narrowing(self, type_narrowing: TypeNarrowing) -> JsonOptions
pub fn with_type_narrowing(self, type_narrowing: TypeNarrowing) -> JsonOptions
Sets when a value is attempted to be narrowed to a more specific type
Trait Implementations§
source§impl Clone for JsonOptions
impl Clone for JsonOptions
source§fn clone(&self) -> JsonOptions
fn clone(&self) -> JsonOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for JsonOptions
impl Debug for JsonOptions
source§impl Default for JsonOptions
impl Default for JsonOptions
source§impl PartialEq for JsonOptions
impl PartialEq for JsonOptions
source§fn eq(&self, other: &JsonOptions) -> bool
fn eq(&self, other: &JsonOptions) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for JsonOptions
impl Eq for JsonOptions
impl StructuralPartialEq for JsonOptions
Auto Trait Implementations§
impl Freeze for JsonOptions
impl RefUnwindSafe for JsonOptions
impl Send for JsonOptions
impl Sync for JsonOptions
impl Unpin for JsonOptions
impl UnwindSafe for JsonOptions
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