Type Alias sp_core::crypto::SecretString

source ·
pub type SecretString = Secret<String>;
Expand description

Secret strings

Aliased Type§

struct SecretString { /* private fields */ }

Implementations

source§

impl<S> Secret<S>
where S: Zeroize,

source

pub fn new(secret: S) -> Secret<S>

Take ownership of a secret value

Trait Implementations

source§

impl<S> Clone for Secret<S>
where S: CloneableSecret,

source§

fn clone(&self) -> Secret<S>

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<S> Debug for Secret<S>
where S: Zeroize + DebugSecret,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<S> Drop for Secret<S>
where S: Zeroize,

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<S> ExposeSecret<S> for Secret<S>
where S: Zeroize,

source§

fn expose_secret(&self) -> &S

Expose secret: this is the only method providing access to a secret.
source§

impl<S> From<S> for Secret<S>
where S: Zeroize,

source§

fn from(secret: S) -> Secret<S>

Converts to this type from the input type.
source§

impl FromStr for Secret<String>

§

type Err = Infallible

The associated error which can be returned from parsing.
source§

fn from_str( src: &str, ) -> Result<Secret<String>, <Secret<String> as FromStr>::Err>

Parses a string s to return a value of this type. Read more