pub struct FilteringConfig {
pub remove_empty_strings: bool,
pub remove_nulls: bool,
pub remove_empty_objects: bool,
pub remove_empty_arrays: bool,
}Expand description
Configuration for filtering operations
Fields§
§remove_empty_strings: boolRemove keys with empty string values
remove_nulls: boolRemove keys with null values
remove_empty_objects: boolRemove keys with empty object values
remove_empty_arrays: boolRemove keys with empty array values
Implementations§
Source§impl FilteringConfig
impl FilteringConfig
Sourcepub fn remove_empty_strings(self, enabled: bool) -> Self
pub fn remove_empty_strings(self, enabled: bool) -> Self
Enable removal of empty strings
Sourcepub fn remove_nulls(self, enabled: bool) -> Self
pub fn remove_nulls(self, enabled: bool) -> Self
Enable removal of null values
Sourcepub fn remove_empty_objects(self, enabled: bool) -> Self
pub fn remove_empty_objects(self, enabled: bool) -> Self
Enable removal of empty objects
Sourcepub fn remove_empty_arrays(self, enabled: bool) -> Self
pub fn remove_empty_arrays(self, enabled: bool) -> Self
Enable removal of empty arrays
Sourcepub fn has_any_filter(&self) -> bool
pub fn has_any_filter(&self) -> bool
Check if any filtering is enabled
Trait Implementations§
Source§impl Clone for FilteringConfig
impl Clone for FilteringConfig
Source§fn clone(&self) -> FilteringConfig
fn clone(&self) -> FilteringConfig
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 FilteringConfig
impl Debug for FilteringConfig
Source§impl Default for FilteringConfig
impl Default for FilteringConfig
Source§fn default() -> FilteringConfig
fn default() -> FilteringConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FilteringConfig
impl RefUnwindSafe for FilteringConfig
impl Send for FilteringConfig
impl Sync for FilteringConfig
impl Unpin for FilteringConfig
impl UnsafeUnpin for FilteringConfig
impl UnwindSafe for FilteringConfig
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> 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