Secret
wrapper type for more carefully handling secret values (e.g. passwords, cryptographic keys, access tokens or other credentials).
rust
use redactedsecret::{Secret, SecretString, SecretVec, SecretBox};
Secret
on any type (Generic Type)```rust use redactedsecret::{Secret, ExposeSecret};
let dummy_PIN = Secret::new(1234);
asserteq!(dummyPIN.exposesecret().toowned(), 1234); ```
SecretString
```rust use redactedsecret::{SecretString, ExposeSecret};
let dummyPIN = SecretString::new("I am a string PIN".toowned());
asserteq!(dummyPIN.exposesecret().toowned(), "I am a string PIN".to_owned()); ```
SecretBox
type```rust use redactedsecret::{Secret, ExposeSecret};
let dummy_PIN = Box::new(Secret::new(1234));
asserteq!(dummyPIN.exposesecret().toowned(), 1234); ```
SecretVec
```rust use redactedsecret::{SecretVec, ExposeSecret};
let dummy_PIN = SecretVec::new(vec![1234]);
asserteq!(dummyPIN.exposesecret().toowned(), vec![1234]); ```