pub struct SerializerOptions { /* private fields */ }
Expand description
Configuration serialization options.
Implementations§
Source§impl SerializerOptions
impl SerializerOptions
Sourcepub fn diff_with_default() -> Self
pub fn diff_with_default() -> Self
Will serialize only params with values differing from the default value.
Sourcepub fn flat(self, flat: bool) -> Self
pub fn flat(self, flat: bool) -> Self
Use flat config structure, as opposed to the default hierarchical one.
In the flat structure, all params are placed in a single JSON object with full dot-separated param paths
(e.g., api.http.port
) used as keys. Because param serializations can still be objects or arrays,
the produced object may not be completely flat.
Use
Sourcepub fn with_secret_placeholder(self, placeholder: impl Into<String>) -> Self
pub fn with_secret_placeholder(self, placeholder: impl Into<String>) -> Self
Sets the placeholder string value for secret params. By default, secrets will be output as-is.
Trait Implementations§
Source§impl Clone for SerializerOptions
impl Clone for SerializerOptions
Source§fn clone(&self) -> SerializerOptions
fn clone(&self) -> SerializerOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SerializerOptions
impl Debug for SerializerOptions
Source§impl Default for SerializerOptions
impl Default for SerializerOptions
Source§fn default() -> SerializerOptions
fn default() -> SerializerOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SerializerOptions
impl RefUnwindSafe for SerializerOptions
impl Send for SerializerOptions
impl Sync for SerializerOptions
impl Unpin for SerializerOptions
impl UnwindSafe for SerializerOptions
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