Struct abscissa_core::Secret[][src]

pub struct Secret<S> where
    S: Zeroize
{ /* fields omitted */ }

Wrapper type for values that contains secrets, which attempts to limit accidental exposure and ensure secrets are wiped from memory when dropped. (e.g. passwords, cryptographic keys, access tokens or other credentials)

Access to the secret inner value occurs through the ExposeSecret trait, which provides an expose_secret() method for accessing the inner secret value.

Implementations

impl<S> Secret<S> where
    S: Zeroize
[src]

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

Take ownership of a secret value

Trait Implementations

impl<S> Clone for Secret<S> where
    S: CloneableSecret
[src]

impl<S> Debug for Secret<S> where
    S: Zeroize + DebugSecret
[src]

impl<'de, T> Deserialize<'de> for Secret<T> where
    T: Zeroize + Clone + DeserializeOwned
[src]

impl<S> Drop for Secret<S> where
    S: Zeroize
[src]

impl<S> ExposeSecret<S> for Secret<S> where
    S: Zeroize
[src]

impl FromStr for Secret<String>[src]

type Err = Infallible

The associated error which can be returned from parsing.

impl<T> Serialize for Secret<T> where
    T: Zeroize + SerializableSecret + Serialize
[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for Secret<S> where
    S: RefUnwindSafe
[src]

impl<S> Send for Secret<S> where
    S: Send
[src]

impl<S> Sync for Secret<S> where
    S: Sync
[src]

impl<S> Unpin for Secret<S> where
    S: Unpin
[src]

impl<S> UnwindSafe for Secret<S> where
    S: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D> OwoColorize for D

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.