Redactrs
What is it?
Redactrs is a wrapper for sensitive data that you want to avoid being leaked by accidentally printing/logging/etc. them.
How the data is redacted is defined by the Redactor. A Redactor is a struct that implements the Redactor-trait.
Usage
In it's most basic form, Redacted is used like this:
use Redacted;
let x: = "sensitive".into;
assert_eq!;
This will by default use the Simple-Redactor. If desired, it can be swapped with the Custom-Redactor.
use Redacted;
use Custom;
let x: = "sensitive".into;
assert_eq!;
To get back the wrapped type, you can either use .into_inner() which consumes the Redacted and returns the wrapped type
or use .inner()/.inner_mut() for a (non mutable) reference of the wrapped type.