pub trait RedactedDebug {
// Required method
fn fmt(&self, engine: &RedactionEngine, f: &mut Formatter<'_>) -> Result;
}Expand description
Formats the redacted value using the given formatter.
This trait behaves similarly to the standard library’s std::fmt::Debug trait, but it produces a redacted
representation of the value based on the provided RedactionEngine.
Types implementing Classified usually implement RedactedDebug as well.
Generally speaking, you should just derive an implementation of this trait.
Required Methods§
Sourcefn fmt(&self, engine: &RedactionEngine, f: &mut Formatter<'_>) -> Result
fn fmt(&self, engine: &RedactionEngine, f: &mut Formatter<'_>) -> Result
Performs the formatting.
§Errors
This function should return Err if, and only if, the provided Formatter returns Err. String redaction is considered an infallible operation;
this function only returns a Result because writing to the underlying stream might fail and it must provide a way to propagate the fact that an error
has occurred back up the stack.