secrecy

Type Alias SecretString

source
pub type SecretString = SecretBox<str>;
Expand description

Secret string type.

This is a type alias for SecretBox<str> which supports some helpful trait impls.

Notably it has a From<String> impl which is the preferred method for construction.

Aliased Type§

struct SecretString { /* private fields */ }

Trait Implementations§

source§

impl Clone for SecretString

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for SecretString

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for SecretString

Available on crate feature serde only.
source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl From<&str> for SecretString

source§

fn from(s: &str) -> Self

Converts to this type from the input type.
source§

impl From<String> for SecretString

source§

fn from(s: String) -> Self

Converts to this type from the input type.