pub struct SerializationOptions {
pub pretty_print: bool,
pub include_metadata: bool,
pub include_timestamps: bool,
pub compression_level: u32,
pub field_filters: Vec<String>,
pub include_only: Option<Vec<String>>,
pub exclude_fields: Option<Vec<String>>,
pub custom_rules: HashMap<String, String>,
}Expand description
Serialization options
Fields§
§pretty_print: boolPretty print output
include_metadata: boolInclude metadata
include_timestamps: boolInclude timestamps
compression_level: u32Compression level (0-9, only for compressed formats)
field_filters: Vec<String>Custom field filters
include_only: Option<Vec<String>>Include only specified fields
exclude_fields: Option<Vec<String>>Exclude specified fields
custom_rules: HashMap<String, String>Custom serialization rules
Implementations§
Source§impl SerializationOptions
impl SerializationOptions
Sourcepub fn add_field_filter(&mut self, filter: String)
pub fn add_field_filter(&mut self, filter: String)
Add field filter
Sourcepub fn set_include_only(&mut self, fields: Vec<String>)
pub fn set_include_only(&mut self, fields: Vec<String>)
Set include only fields
Sourcepub fn set_exclude_fields(&mut self, fields: Vec<String>)
pub fn set_exclude_fields(&mut self, fields: Vec<String>)
Set exclude fields
Sourcepub fn add_custom_rule(&mut self, field: String, rule: String)
pub fn add_custom_rule(&mut self, field: String, rule: String)
Add custom rule
Trait Implementations§
Source§impl Clone for SerializationOptions
impl Clone for SerializationOptions
Source§fn clone(&self) -> SerializationOptions
fn clone(&self) -> SerializationOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SerializationOptions
impl Debug for SerializationOptions
Auto Trait Implementations§
impl Freeze for SerializationOptions
impl RefUnwindSafe for SerializationOptions
impl Send for SerializationOptions
impl Sync for SerializationOptions
impl Unpin for SerializationOptions
impl UnsafeUnpin for SerializationOptions
impl UnwindSafe for SerializationOptions
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more