Crate secret_string

Crate secret_string 

Source
Expand description

A wrapper around strings that hides their contents when printed or formatted for debugging./// It WILL however serialize the value when using serde serialization/deserialization.

§Examples

use secret_string::SecretString;
let secret = SecretString::new("my_secret_password");
assert_eq!(format!("{}", secret), "******************");
assert_eq!(format!("{:?}", secret), "SecretString(******************)");
assert_eq!(secret.value(), "my_secret_password");

Structs§

SecretString
A string wrapper that hides its contents when printed or formatted for debugging.