Struct seed_keeper_core::SecretBytesMut
source · pub struct SecretBytesMut(/* private fields */);Expand description
Instance of [BytesMut] protected by a type that impls the ExposeSecret
trait like Secret<T>.
Because of the nature of how the BytesMut type works, it needs some special
care in order to have a proper zeroizing drop handler.
Implementations§
source§impl SecretBytesMut
impl SecretBytesMut
sourcepub fn new(bytes: impl Into<BytesMut>) -> SecretBytesMut
pub fn new(bytes: impl Into<BytesMut>) -> SecretBytesMut
Wrap bytes in SecretBytesMut
Trait Implementations§
source§impl Clone for SecretBytesMut
impl Clone for SecretBytesMut
source§fn clone(&self) -> SecretBytesMut
fn clone(&self) -> SecretBytesMut
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for SecretBytesMut
impl Debug for SecretBytesMut
source§impl Drop for SecretBytesMut
impl Drop for SecretBytesMut
source§impl ExposeSecret<BytesMut> for SecretBytesMut
impl ExposeSecret<BytesMut> for SecretBytesMut
source§fn expose_secret(&self) -> &BytesMut
fn expose_secret(&self) -> &BytesMut
Expose secret: this is the only method providing access to a secret.
source§impl From<BytesMut> for SecretBytesMut
impl From<BytesMut> for SecretBytesMut
source§fn from(bytes: BytesMut) -> SecretBytesMut
fn from(bytes: BytesMut) -> SecretBytesMut
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for SecretBytesMut
impl Send for SecretBytesMut
impl Sync for SecretBytesMut
impl Unpin for SecretBytesMut
impl UnwindSafe for SecretBytesMut
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