pub struct Sensitive<T: Zeroize>(/* private fields */);Expand description
NewType wrapper for sensitive values
- Uses
Zeroizingto ensure the value is zero’ed out when it leaves scope. - Uses
Debugto ensure its not leaked through logs and tracing. - Uses
Pinto ensure it cannot move (which can cause leakes)
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Sensitive<T>
impl<T> RefUnwindSafe for Sensitive<T>where
T: RefUnwindSafe,
impl<T> Send for Sensitive<T>where
T: Send,
impl<T> Sync for Sensitive<T>where
T: Sync,
impl<T> Unpin for Sensitive<T>
impl<T> UnsafeUnpin for Sensitive<T>
impl<T> UnwindSafe for Sensitive<T>where
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