pub struct SecretBytes(/* private fields */);Expand description
A secret string held structurally.
The type exposes no way to read the bytes back through a public API: the
wire codec and the active-core bridge are the only in-crate readers, and
both are audited. Debug, Display, PartialEq, Ord and Hash are all
deliberately absent or redacting, so a secret can never leak through
logging, assertion output, sorting or map keys, and can never be compared
for equality (the anti-oracle rule).
Implementations§
Trait Implementations§
Source§impl Clone for SecretBytes
impl Clone for SecretBytes
Source§impl Debug for SecretBytes
impl Debug for SecretBytes
Source§impl Display for SecretBytes
impl Display for SecretBytes
Source§impl From<&str> for SecretBytes
impl From<&str> for SecretBytes
Source§impl From<String> for SecretBytes
impl From<String> for SecretBytes
Auto Trait Implementations§
impl Freeze for SecretBytes
impl RefUnwindSafe for SecretBytes
impl Send for SecretBytes
impl Sync for SecretBytes
impl Unpin for SecretBytes
impl UnsafeUnpin for SecretBytes
impl UnwindSafe for SecretBytes
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