pub trait Censor {
// Required method
fn censor(&mut self);
// Provided method
fn censored(self) -> Self
where Self: Sized { ... }
}Expand description
Implemented by values carrying secrets, so each one names its own instead of a central list having to track them.
Censoring happens in place and on an owned value rather than during serialization: the same
serde::Serialize impls back both the API responses and the jsonb columns these values are
stored in, so a serializer that censored would write the placeholder to the database.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".