Files
hyperswitch/crates/router/src/utils/custom_serde.rs
Sampras Lopes 13c66df92c feat(events): add masked json serializer for logging PII values (#2681)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-10-27 07:28:09 +00:00

8 lines
203 B
Rust

pub fn display_serialize<T, S>(value: &T, serializer: S) -> Result<S::Ok, S::Error>
where
T: std::fmt::Display,
S: serde::ser::Serializer,
{
serializer.serialize_str(&format!("{}", value))
}