Struct smart_config::SerializerOptions
source · 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 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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)