//! //! Secret strings //! //! There is not alias type by design. use alloc::{ str::FromStr, string::{String, ToString}, }; #[cfg(feature = "serde")] use super::SerializableSecret; use super::{Secret, Strategy}; use crate::StrongSecret; #[cfg(feature = "serde")] impl SerializableSecret for String {} impl FromStr for Secret where I: Strategy, { type Err = core::convert::Infallible; fn from_str(src: &str) -> Result { Ok(Self::new(src.to_string())) } } impl FromStr for StrongSecret where I: Strategy, { type Err = core::convert::Infallible; fn from_str(src: &str) -> Result { Ok(Self::new(src.to_string())) } }