pub struct Sealed<T: Zeroize>(/* private fields */);Expand description
A value that cannot reach any sink: no Debug, no Display, no serde,
no Clone; drop zeroizes (secrecy::SecretBox). Expose call sites are
whitelisted by xtask secret (EXPOSE_WHITELIST).
Implementations§
Source§impl Sealed<String>
impl Sealed<String>
Sourcepub fn into_vault_value(self) -> Zeroizing<String>
pub fn into_vault_value(self) -> Zeroizing<String>
The one exit besides redemption: into the vault that will hold it. Consuming, so a caller cannot keep what it just handed over, and the result is still a type that zeroizes on drop.
It lives here rather than at the enrolment site because that is what keeps the enrolment site off the expose whitelist: plaintext leaves this type in the module that defines the type.
Auto Trait Implementations§
impl<T> Freeze for Sealed<T>
impl<T> RefUnwindSafe for Sealed<T>where
SecretBox<T>: RefUnwindSafe,
impl<T> Send for Sealed<T>
impl<T> Sync for Sealed<T>
impl<T> Unpin for Sealed<T>
impl<T> UnsafeUnpin for Sealed<T>where
SecretBox<T>: UnsafeUnpin,
impl<T> UnwindSafe for Sealed<T>where
SecretBox<T>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more