pub struct Normalizer {
pub canonicalize_json: bool,
pub trim_whitespace: bool,
pub collapse_whitespace: bool,
pub lowercase: bool,
pub round_numbers: Option<u32>,
pub drop_meta: Vec<String>,
pub mask: Vec<Mask>,
pub mask_meta: bool,
}Expand description
Configuration for the normalization pass.
Normalizer::default is deliberately conservative: it canonicalizes JSON
key order and trims surrounding whitespace, both of which are pure noise, but
changes nothing else. Everything more opinionated is opt-in.
Fields§
§canonicalize_json: boolRecursively sort object keys inside args so key order does not matter.
trim_whitespace: boolTrim leading/trailing whitespace from content.
collapse_whitespace: boolCollapse internal runs of whitespace in content to a single space.
lowercase: boolLowercase content before comparison.
round_numbers: Option<u32>Round floating-point numbers in args to this many decimal places.
drop_meta: Vec<String>Metadata keys (on steps and on the trace) to drop entirely.
mask: Vec<Mask>Built-in maskers to apply to content, name, and string leaves of
args.
mask_meta: boolAlso apply mask to string values inside meta.
Implementations§
Trait Implementations§
Source§impl Clone for Normalizer
impl Clone for Normalizer
Source§impl Debug for Normalizer
impl Debug for Normalizer
Source§impl Default for Normalizer
impl Default for Normalizer
Source§impl<'de> Deserialize<'de> for Normalizerwhere
Normalizer: Default,
impl<'de> Deserialize<'de> for Normalizerwhere
Normalizer: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Normalizer
impl PartialEq for Normalizer
Source§impl Serialize for Normalizer
impl Serialize for Normalizer
impl StructuralPartialEq for Normalizer
Auto Trait Implementations§
impl Forget for Normalizer
impl Freeze for Normalizer
impl RefUnwindSafe for Normalizer
impl Send for Normalizer
impl Sync for Normalizer
impl Unpin for Normalizer
impl UnsafeUnpin for Normalizer
impl UnwindSafe for Normalizer
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