1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
//! Secret strings

use super::{CloneableSecret, DebugSecret, Secret};
use alloc::str::FromStr;
use alloc::string::{String, ToString};

/// Secret strings
pub type SecretString = Secret<String>;

impl DebugSecret for String {}
impl CloneableSecret for String {}

impl FromStr for SecretString {
    type Err = ();
    fn from_str(src: &str) -> Result<Self, Self::Err> {
        Ok(SecretString::new(src.to_string()))
    }
}