[−][src]Struct abscissa_core::Secret
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.
Methods
impl<S> Secret<S> where
S: Zeroize,
[src]
S: Zeroize,
Trait Implementations
impl<S> Clone for Secret<S> where
S: CloneableSecret,
[src]
S: CloneableSecret,
impl<S> Debug for Secret<S> where
S: Zeroize + DebugSecret,
[src]
S: Zeroize + DebugSecret,
impl<'de, T> Deserialize<'de> for Secret<T> where
T: Zeroize + Clone + DebugSecret + DeserializeOwned,
[src]
T: Zeroize + Clone + DebugSecret + DeserializeOwned,
fn deserialize<D>(
deserializer: D
) -> Result<Secret<T>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
[src]
deserializer: D
) -> Result<Secret<T>, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
impl<S> Drop for Secret<S> where
S: Zeroize,
[src]
S: Zeroize,
impl<S> ExposeSecret<S> for Secret<S> where
S: Zeroize,
[src]
S: Zeroize,
fn expose_secret(&self) -> &S
[src]
impl FromStr for Secret<String>
[src]
type Err = ()
The associated error which can be returned from parsing.
fn from_str(
src: &str
) -> Result<Secret<String>, <Secret<String> as FromStr>::Err>
[src]
src: &str
) -> Result<Secret<String>, <Secret<String> as FromStr>::Err>
impl<T> Serialize for Secret<T> where
T: Zeroize + DebugSecret + Serialize,
[src]
T: Zeroize + DebugSecret + Serialize,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Auto Trait Implementations
impl<S> RefUnwindSafe for Secret<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for Secret<S> where
S: Send,
S: Send,
impl<S> Sync for Secret<S> where
S: Sync,
S: Sync,
impl<S> Unpin for Secret<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for Secret<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> AsAny for T where
T: Any,
[src]
T: Any,
fn as_any(&Self) -> &(dyn Any + 'static)
[src]
fn as_mut_any(&mut Self) -> &mut (dyn Any + 'static)
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,